One Signal REST API - Get the list of templates - rest

How are you?
In principle, sorry for my English.
I need to work with an integration with One Signal REST API both for web and mobile application, but I can't find any endpoint to bring the templates (and I need them to include the id of the template in the request body as indicated in the documentation of "POST -> create notification")
Does anyone know if there is an endpoint that brings me the list of templates?
Thanks a lot

I confirm that (as of the date, OneSignal REST API v8) it's not possible to obtain the OneSignal template_id via REST API

got to OneSignal console
select the app
select Messages > Templates
select the template that you want to know its ID
get the ID from the URL, like shown in the image below

Related

LinkedIn API reference

I'm trying to pull all the data associated with my companies LinkedIn page, but I can't figure out how to navigate the API... (I already have a bearer token).
I've looked at these reference fields, but the only GET request that gives me anything back is https://api.linkedin.com/v1/people/~?format=json and that gives me my personal profile info, which is not what I want.
If I change "people" to "visitors" for example, I get back:
"Unknown field {visitors} in resource {Root}"
Is there any documentation on what resources are available in {Root} or is there a GET request I can send that will show me the available resources?
Note: the only reason I'm using v1 here is because that's the only request I can get to work...
well, the V1 you are using is outdated. it will actually be terminated in March 2019. The reason why V2 is not working. is because V2 requires a LinkedIn partnership. you can request one here.
there are multiple ways you can request company data. for V1 it is called:
the manage company pages API, click here for more information
for V2 you should look at organization API, click here for more information
PS: im not sure if there is a way to get the root information. but hopefully this helps.

How to get github users from city using Github REST API?

Background
I am working on an app and I need to get all the projects of all github users that live in a given city using the GitHub Rest API v3: https://developer.github.com/v3/
Research
Now I know I can get all the users with the following url:
https://api.github.com/users
And once I have a user, I can get all his repos and info from there.
Problem
The problem is that I don't know how to filter those users by city!
I have tried adding a paramter location=London but it always returns the same, probably because this is not the real parameter...
Another option would be to get all the github users from the world, and then filter them by city .... which would be totally insane.
The best option I found so far was to use this link:
https://github.com/search?q=language:javascript+location:Barcelona&type=Users
However, this link is the web version, which does not use the REST API.
Question
How do I get all the users from a given city using the Github REST API?
You are using the /users endpoint. You need to use the /search/users endpoint:
https://api.github.com/search/users?q=location%3Aiceland
Will search for users located in Iceland
Using that gets me a response with a bunch of users and after cross checking the first 3, they all have their location set to "Iceland" in their profiles.

Is the unpublished Google Suggest Queries API VALID for use

Does anyone know if it's legal to use Google suggestqueries in a commercial product ?
As I'm using the open stream of the ajax jsonp request https://suggestqueries.google.com/complete/search?callb.... in searchengine based product.
No - it can't be legally used and the search team changes the endpoint every now and then so apps can't abuse it , however there are wrapper services which emulate / Gather data from the endpoints through their own means - http://keywordtool.io/api is an example of that

How to retrieve multiple user account details through their Facebook IDs in graph API?

This could be a duplicate of here and here, but can some one provide a complete working example for following.
I have set of different Facebook account Ids, and i need to get the respective account details(user name etc) from these account ids. I need to send a Batch Request for Graph API. Something as follows,
(https://graph.facebook.com?ids=user1, user2, user3,...)
Is this possible as pure HTTP GET request ?
I am using Facebook SDK with Android for the moment. I have gone through the API doc but unable to build the required query yet. Please help.
Maybe post a snippet of your code so we can try to solve your problem better. With the info you provided, the URL https://graph.facebook.com/?ids=user1,user2,user3 works just fine and returns 3 users.
The URL format looks correct. Keep in mind the total character limit, but otherwise I suspect you are stuck in a different place (e.g. sending the query or saving the result).

How do i use an API

I've never used an API and was wondering how you use them... I would like to use facebook, twitter and vimeo's api,
Can someone explain the basics of using them, how do i access them and use them etc.
Please and thanks
Neil
How to use an API depends on the API. Usually the API creator has documentation on how to use their specific API.
Mostly, things work like the following:
You register to get a developer key. Then, you send requests to the service via HTTP (for example Twitter is using REST, which requires you to send XML or JSON to a specific http-URL providing your key). You get an answer from the service, which you must then parse and react to accordingly (for example filling a list with contacts, etc.).
Most of the time this all comes down to:
Create an XML or JSON document that describes the call parameters
Send the document to an URL using GET, POST or other request methods
Get the server's response
Parse and evaluate the response
The specific ways to use the API, especially performing authentication, can be found on the service's developer pages.
The best way to start if you want to use an API is to read it's documentation, find some tutorials and code examples. This is always/usually published by the one offering an API.
Good luck :)