I'm trying to get status about my video with dailymotion api. Some of videos are not getting ads. So i'm trying to understand how it's gonna be.
I tried like this but it's not telling about ads status.
String.Format("https://api.dailymotion.com/user/{0}/videos?fields=id,title,partner&limit=100&page={1}", userID, pageNumber)
i thought like partner key is enough to understand that situation but it's not. Can someone help me ? Also i tried to get something from http code but it didn't work.
Any suggestions ?
You can't know if ads will be displayed or not on a video. The AD server uses many criteria to determine what to do.
When the player is loaded on the page, a call to the ad server is sent in real time to know if an ad is available or not.
The API player provides some useful ad events, maybe you can use them: api events documentation
Related
I'm new to iOS development and I'm trying to make an app that tracks my student loans. I would like to have the app simply display a balance found on the loan's website and build on that behavior. I've got my app to open up safari to the website but I'd like more of a web-crawling behavior so it's done in the background. This web-crawler needs to be able to login to the website and then find a field with the loan balance value..
I've looked up several ways on how to do this but I can't get any of them to work with my novice level of experience with swift. If anyone has a recommendation and a direction to go with this, that would be great.
Thanks in advance!
I've written an app to get my uni's schedules, payment records, and grades by bypassing the login and gain access to API used by the website.
The step you could take are probably very similar to mine
Find out how the website authenticate its users (could be by cookie, session id's etc) You need to have some knowledge on web too. You can use the network tab on Chrome/Brave/Safari or any other browser to see what the website is doing when you click on 'login' for example. You could use Charles too, 30 days of trial should be enough.
After authentication succeed, track what API route the website use to get the datas to html. See what information you need to access the API route. Postman would be very handy to see the JSON response by the API.
To parse the response, you can use URLSession or networking library like Alamofire to get the job done.
If you want to see how I did it, here's the GitHub repo.
We need to add domains to all of our videos. But I cant find a API call to add a domain to all of the videos - only one video at a time.
Right now I am doing two steps:
https://api.vimeo.com/me/videos....
Here I get all of our videos and their IDs and a hell of lot of stuff I dont need.
Then I loop through all of the videoIDs and call
https://api.vimeo.com/videos/{videoId}/privacy/domains/{newDomain} for each video.
This results in 1200 put requests which is not good. Furthermore I am not sure if we get banned with to many requests.
Is there som APIs that I have missed which supports what I am trying to do ?
Any help is appreciated.
Instead of using the API to do this, I suggest setting the default video privacy for all your videos at https://vimeo.com/settings/videos/upload_defaults - this includes the ability to add domain privacy.
Looking through the documentation I found an option for reducing the amount of data return. By adding e.g. &fields=uri,privacy to my api calls I reduced the amount of data returned.
I still have to loop each video and do a put however the first step is a lot faster.
I cannot find on the Vimeo API how to get all my VOD videos with the description, title, price and the url to buy them. ondemand/pages is not really showing any useful info, neither is google.
Anybody knows the endpoint for this or how to get this info?
Vimeo API for endpoints:
https://developer.vimeo.com/api/endpoints
Specifically
https://developer.vimeo.com/api/playground/me/ondemand/pages
If you're already using this and it doesn't have the info you need, you might have to contact support and request it to be added.
Can you track events such as, who checked-in, who uploaded pictures on a certain venue on Foursquare? Im not only talking about numbers but also the user involved on the event. Is this possible? And by the way, im doing this on AS3, will there be some complications regarding this? Thanks
Unless a user authenticates your app, you cannot access their check-in information. You can, however, retrieve photos for a venue via the venues/VENUE_ID/photos endpoint
I am getting information about the track I am listening to from last.fm.. I cannot however get the information about what I am scrobbling from, like you see on you last.fm page: "scrobbling now from spotify"
Does anyone know if this is possible without scraping the user page?
I don't see anything in the API docs - could easily be missing something.
The call I am using to get the now playing track is user.getRecentTracks which you use a attribute on the first song returned (nowplaying="true") to tell if its being played now and there is nothing about what I am listening on there.
The answer is: no, Last.fm API doesn't support this feature.
The only way you can get this information is to scrap it from <div class="scrobblesource">.