Tag Archives: api
API Documentation with IODocs
Iodocs is a node.js application (which is fun for a PHP developer. Most developers write a bit of JS, but this one hasn’t). You describe your API and all its methods in JSON, and then iodocs presents an interface for you to enter API keys, add parameters to each request and press the “try it!” button. This makes your API call and shows you the results on screen, which seems like a great way to demonstrate what all the various parameters do!
Posting Raw Data with Curl
I put the data into a separate file, data.txt
and then used curl to direct that data at my local URL:
curl -X POST http://localhost/app/test.php --data @data.txt
I find this approach useful for testing, but since I had to look up how to do it, I thought I’d put it here for reference!
Bit.ly API: Bundles and Short URLs
To get around this, I used their API to make a page which lists my bit.ly bundles, and creates shortlinks for each of them (once you’ve created a shortlink for a given URL once, bit.ly just re-uses the same ones the next time you ask to shorten the same URL, so this is less silly than it sounds).
In case the code is helpful, I thought I’d share. Continue reading
Fetching Your Talks from the Joind.In API
I’ve recently been thinking that I should also do a better job of linking through to the various talks I’m giving/have given – and at around the same time I was contacted by the good folk at mojoLive about integrating against joind.in. To cut a long story short, the joind.in API now has the functionality for users to retrieve their list of talks! Continue reading
Tips on Writing an API for a Smartphone App
[qtweet 197668987352530944]
I have lots of advice for Olly (whom I know personally) but there’s no way it will fit into a tweet! So here it is, in rather longer form :)
Continue reading
Using OAuth2 for Google APIs with PHP
I’ve written about Google and OAuth before, but that was OAuth v1.0, and they are introducing OAuth2 for their newer APIs; in this example I was identifying myself in order to use the Google Plus API (which turns out not to do anything you’d expect it to do, but that’s a whole separate blog post!). Continue reading
Using JIRA’s REST API to Create a Dashboard
- crazy about APIs
- living with some accessibility issues
Put these two things together and what do you get? Actually don’t answer that! Today what you get is an example of integrating with JIRA’s REST API, because their recent “upgrade” locked me out of the issue listings pages completely and I really do need to be able to see a list of bugs! Their bug editing screen is quite usable, so it’s just the list that I need here, but you could easily call their other API methods as you need to. Continue reading
Google OAuth 403 Response
OAuth::getLastResponse()
to my error logs (this is PHP code, and you need to call OAuth::enableDebug()
before you make the request to get this output) so I could see that I was getting the following back from Google:
GData
sslRequired
SSL is required to perform this operation.
Closer inspection shows that for one of the google endpoints, I had a prefix of http://
rather than https://
. Those single-character bug fixes that take hours to find are my favourite!