What input is the API expecting? - api

I need to use this API : https://adresse.data.gouv.fr/api/
and i want to know how can i know the input is this API expecting.

The api you need to request to is
http://api-adresse.data.gouv.fr/search/
If you want to do a full text search you have to pass in a q request param in the url like
http://api-adresse.data.gouv.fr/search/?q=YOUR_TEXT
If you want to limit the response from the api call to 10 records, you can use limit param
http://api-adresse.data.gouv.fr/search/?q=YOUR_TEXT&limit=10
Go through the documents to see a complete list of input params that can be passed in the api call.

You can use Postman in order to run or test api.

Related

Using a Wildcard in Postman API Call

I am trying to perform a GET API call in Postman.
One of the parameters in the query (a string) should include a wildcard, since I want to receive response which includes several optional values (for example "Demo1...", "Demo2...").
Any suggestion how this can be done?

API additional id,

I'm trying to get data from my limesurvey and wonder why in API request I need to pass id: 1 as the third body parameter.
{method:'get_session_key',params:['myusername','mypassword'],id:1}
If I omit id or pass id:0, I will get the response data with an empty string. I can put any positive and negative integers there and I don't know exactly why it is required.
I'm following instructions on RemoteControl 2 API
That's the request id.
On the jsonRPCClient (component outside of LS) code it is fixed to 1.
I think it is part of a standard to use notifications, which are not used on LS API.
So, just fix it to 1 :)

Why I only getting id's back in response? IGDB api

I already read the documentation and I think I am making the simplest request in the correct way, but it always returns only the IDs, instead of all the fields of the games
Documentation example: Documentation Example
The request header is fine. I know this because I can get the expected request if fields = * as querystring
this is my request:
You have to provide the fields you want inside the body.
Like this:
fields age_ratings,aggregated_rating,aggregated_rating_count,alternative_names,artworks,bundles,category,checksum,collection,cover,created_at,dlcs,expansions,external_games,first_release_date,follows,franchise,franchises,game_engines,game_modes,genres,hypes,involved_companies,keywords,multiplayer_modes,name,parent_game,platforms,player_perspectives,rating,rating_count,release_dates,screenshots,similar_games,slug,standalone_expansions,status,storyline,summary,tags,themes,total_rating,total_rating_count,updated_at,url,version_parent,version_title,videos,websites;"

What is the proper way to format a GET request to retrieve all media items of the Instagram user "self"?

Looking at https://www.instagram.com/developer/endpoints/users/ I have gathered that calling https://api.instagram.com/v1/users/self/media/recent/?access_token=ACCESS-TOKEN will return "the most recent media published by the owner of the access_token."
In sandbox mode I understand that I will receive a maximum of 20 media items from this call. I also realize that the response code has a pagination object that I can use to retrieve up to 20 more media items (see below)
"pagination": {
"next_max_tag_id": "1387272337517",
"deprecation_warning": "next_max_id and min_id are deprecated for this endpoint; use min_tag_id and max_tag_id instead",
"next_max_id": "1387272337517",
"next_min_id": "1387272345517",
"min_tag_id": "1387272345517",
"next_url": "https://api.instagram.com/v1/tags/cats/media/recent?access_token=xxx&max_tag_id=1387272337517"
}
These are the listed parameters of this Request.
PARAMETERS
ACCESS_TOKEN A valid access token.
MAX_ID Return media earlier than this max_id.
MIN_ID Return media later than this min_id.
COUNT Count of media to return.
My question is: Is there a way to structure my GET request in a way that returns all media items from a single call? I understand that this is not possible in sandbox mode, given a user with more than 20 media items. If possible please provide a detailed explanation of the COUNT parameter.
I imagine a possible GET request would look like https://api.instagram.com/v1/users/self/media/recent/?access_token=ACCESS-TOKEN?COUNT=X
Thank you. <3
When you go live mode you can use the count= param to get more than 20 in one API call, however I have noticed that count=33 is the maximum you can get for this API call, even if you anything more than 33, it only returns 33.
You still have to use the pagination in JSON response to get the next set of media items, easiest way is to use the pagination.next_url to make API call and get next set of media items

Foursquare API mayorships are always empty?

Did anyone know why I'm always getting an empty response for the mayorship of a venue? Say I perform a request like this
https://api.foursquare.com/v2/venues/51a2445e5019c80b56934c75
I don't get the actual mayor of this place. However, according to this https://developer.foursquare.com/docs/api/venues/details it should be in the venues response.
Ok I got it. You have to add the param for swarm-style response. So the actual request should look like this:
https://api.foursquare.com/v2/venues/51a2445e5019c80b56934c75?m=swarm