Update namedStyles through Google Docs API - google-docs-api

I am trying to update the namedStyles through Docs API, but struggling to find a way around it. It seems you can only create namedStyles when creating a new document through the API - batchUpdate doesn't seem to want to touch it.
Am I missing something?

Posting this for documentation purposes.
As Tanaike said in a comment, currently namedStyles cannot be updated via Docs API, even though this action can be done through Docs UI. There is currently no possible batchUpdate request to achieve this via API.
You could consider filing a Feature Request in this Issue Tracker component.

Related

Subscribe to Jira search filter using jira Rest API

I have created a Jira search filter, using this request:
POST /rest/api/2/filter
This worked pretty well. Now after I created the filter, I want to get automatically subscribed to it.
Is there a way to do it with the REST API? Or is the only possible way to do this manually?
I already found this in the documentation: https://docs.atlassian.com/software/jira/docs/api/REST/7.4.1/#api/2/filter-createFilter
There, I found the "subscriptions" property, but I can't seem to figure out how exactly I have to write this, to get the correct syntax.
Thanks.
There is a JIRA Feature Request that is still being considered for this to be implemented. Please take a look at this for more details.
For now, all we can do is Fetch or Create Filters using the JIRA ReST APIs but editing the subscriptions should be manual tasks.
Please take a look at the following Atlassian Question which confirms the same.
Details as provided in this Question:
You can do a GET to see the filter subscriptions values you have via:
GET /rest/api/2/filter/favourite?expand=subscriptions
Hope this helps!

Delete channel in Slack API

I am finishing development of API similar to Slack API, but with more/different features. I have to implement an API (more like command/endpoint) for deleting a room and I can't find anything like that in the documentation.
It seems that it can be done via webUI according to this help article.
But there is no method for it in Slack API methods.
I think there is only channels.archive with similar purpose, but it seems very strange not having a method to delete a room.
Is it really like that that room can't be deleted via Slack API?
There is no method for deleting a channel in the official API, but there is the undocumented method channels.delete that has this exact functionality.
Basic usage is:
https://slack.com/api/channels.delete?token=TOKEN&channel=C12345678
Please note that undocumented methods are not officially supported by Slack and might change or stop working without any prior warning. Still, they are very useful and I have made a github to document all known undocumented methods. Please feel free to use and contribute.
Tried it today 2nd June 2022 and it responds with 'unknown_methods', I guess it's outdated now.

Missing video ID from comment object

I am trying to retrieve a comment on a video by comment ID using the youtube v3 data api.
Here's the documentation part I am concerned with: https://developers.google.com/youtube/v3/docs/comments#resource
In the resource documentation, there's a property called "videoId" that I don't get when using this API call:
https://www.googleapis.com/youtube/v3/comments?part=snippet,id&key={YOUR_KEY_HERE}&id=z13cdfiygorrst1f422fuzi5eqevcdwsf
Edit: I have already been trying working around this problem to no avail, also started an issue on google issue tracker to no answer. As far as I know, the youtube-data-api tag is where the developers track the issues in the API.
I am not sure why the comments endpoint does not return the videoId, but the commentThreads does.
So calling https://www.googleapis.com/youtube/v3/commentThreads?part=snippet,id&key={YOUR_KEY_HERE}&id=z13cdfiygorrst1f422fuzi5eqevcdwsf and parsing the result to get the proper comment in the comment threads (that includes replies) seems like a reasonable workaround...

Post photo to pinterest by API

I need to post a photo to my own board in Pinterest via their API.
However, I cannot find any mention in their API documentation of how to accomplish this - https://developers.pinterest.com/
I have tried to search for an approach but found only dated information.
The following script does exactly what I'd like to do, however I want to implement it via Ruby/Rails - http://www.nextscripts.com/pinterest-automated-posting/
Any advice or documentation on how I could implement this functionality would be helpful.
Thank you in advance!
You may find this gem handy, though its a bit dated:
https://github.com/bensheldon/staplegun
There is a project, that helps to create pin automatically via undocumented Pinterest API https://github.com/v-pukman/pinterest_spammer

Create a salesforce user entry in iOS using REST API?

I was wondering if anyone could point out how to create new user / lead entries in salesforce?
I've tried looking at http://www.salesforce.com/us/developer/docs/api_rest/index.htm but I can't seem to find anything.
I think you can't do it out of the box with the Rest API, but, you can make your custom webservices with Apex REST (check out some code example: http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_rest_code_sample_basic.htm )
I found myself doing that for things I could not achieve using the regular Rest API, in your case, you could do just about the same thing.

Resources