How can I use nested includes with the Football API? (SOLVED) - nested

I'm trying to enrich my API response with includes using the sportmonks.com football API. Here is the documentation: https://sportmonks.com/docs/football/2.0/leagues/a/get-by-id/7
However, it seems like it doesn't work with my request:
https://soccer.sportmonks.com/api/v2.0/leagues/2?api_token=MYTOKEN&include=season&fixtures
How can I enrich this response with all the fixtures of a season?
I've solved the issue. Instead of season&fixtures, I should've used season.fixtures. Thanks for the help guys!

Related

What is the REST API URL to get "Linked Defects" from Test in ALM

I was not able to get the linked defects from the test, Is there a way to get it through REST API ?
You have to use the Cross-Relations and approach it from the defects side:
.../defects?query={test.id[>=1 And NOT = 5]}
This one will give you all the defects that are connected to the tests with id 1-4.
More info on Cross-Filters here
I use multiple query params to get the defects only for relevant test cycle with following request (otherwise I was fetching too many defects):
.../defects?query={test.id[12345];test-instance.id[6789012]}

Instagram api not-working

I trying to use instagtram api. But endpoints: comments and likes not working.
https://www.instagram.com/developer/endpoints/comments/
But if I try to get comments - Data is empty.
What`s wrong?
Instagram API after Jun'16 is so unusable.
Try fetch this https://www.instagram.com/query/?q=ig_shortcode(BK07W-Xhq6S){comments.last(20){count,nodes{id,created_at,text,user{id,username,full_name}},page_info}} and you receive JSON with comments data.

Cannot display an overview of this response error in nexmo

i tried to run the code present in the below link
https://github.com/linroex/Nexmo-PHP-Library/blob/master/NexmoMessage.php
but i am getting cannot display overview of this response.warning Invalid argument supplied for foreach() in NexmoMessage.php on line 228.
or else please suggest some api to be used to send sms to phone using php which could be implemented easily
Check out https://docs.nexmo.com/tools/libraries for a list of libraries Nexmo recommends. Personally I'm a fan of https://github.com/fillup/nexmo since I wrote it, but I'm sure https://github.com/appleboy/CodeIgniter-Nexmo-Message is great too. If you try the fillup/nexmo library and have any issues let me know, will be glad to help.

How to send POST variables with Nipple on NodeJS

I am trying to use nipple to post to an url within my nodejs application, which itself is running on hapi.js
The documentation essentially doesn't seem to spell it out.
(https://www.npmjs.com/package/nipple)
I tried passing it as payload inside options but that, while not returning an error, returns a 400. Can someone provide a correct example doing a post using nipple?
Essentially, I have two variables that I need to send - let's call the var1 and var2.
Thanks!
That link says that the project has been renamed to wreck. On wreck's github, several of the tests are for a post requests, including this one:
https://github.com/hapijs/wreck/blob/master/test/index.js#L68
If you are still scratching your head, you could also try using curl or postman to sanity check your URL, regardless of any nipple/wreck errors. If that also gives you a 400, nipple/wreck may not be the culprit.

Pagination info missing in instagram api

I am using the most popular api via instagram api
In the document, it saying something about pagination and next_url but when I
use the link below with my app ID. I don't see any pagination info in the json.
Am i missing something?
https://api.instagram.com/v1/media/popular?client_id=CLIENT-ID
or
https://api.instagram.com/v1/media/popular?client_id=CLIENT-ID&count=10
you should get the pagination info back in a an object callged "pagination"
"pagination": {
"next_max_tag_id": "1335465136530",
"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": "1335465136530",
"next_min_id": "1335465556125",
"min_tag_id": "1335465556125",
"next_url": "https:\/\/api.instagram.com\/v1\/tags\/cats\/media\/recent?callback=jQuery17201362594123929739_1335440328560&_=133544032857&client_id=xxx&max_tag_id=1335465136530"
}
Which has the next_url you are looking for
The pagination information will be empty if the requested user's feed has fewer posts than the default query count. In other words, if the instagram account only has five pictures, there is no pagination info.
There is not a lot of documentation around pagination on the official API.
Check out this tutorial for more guidance and depth.
http://eduvoyage.com/search-instagram-pagination.html
You need to use the "min_tag_id" and "max_tag_id" to get the images you want.
As your using the endpoint to get popular images, you might want to try something like this.
https://api.instagram.com/v1/tags/cats/media/recent?callback=?&client_id=YOURID&max_tag_id=1364206789229
But if you are after a specific tag, try something like this.
https://api.instagram.com/v1/tags/cats/media/recent?callback=?&client_id=YOURID&max_tag_id=1364206789229
media/popular endpoint does not have a pagination object. As Ryan Ore explained some endpoints provide pagination and some dot not.
You check whether the endpoint has a pagination or not by "pagination": {} object. If the object exists the endpoint has pagination.

Resources