I'm making API call for other developers to use, so my question might sound silly but i need the community help. So thanking in advance.
I finished an API call for a web service using this https://github.com/chriskacerguis/codeigniter-restserver. All api calls working perfectly when i test it using postman plugin for chrome.
I've forwarded my API call to an android developer and he was able to use GET methods by using direct URL. now he is asking me to provide direct URL to the POST, PUT and DELETE API call, Which i do not know how to provide.
If for example, this is my API call to use the GET method, http://example.com/api/chemists/2 using the method chemists_GET. How do i get the direct URL to this PUT API call using this method chemists_PUT. like wise chemists_POST and chemists_DELETE method.
Kindly help me.
Yoyu have ki9nd of answered it yourself... with the link you gave...
You're URL's to the endpoints will be as you have them... however you will need to implement the post functions etc as defined in https://github.com/chriskacerguis/codeigniter-restserver#responses that page also described delete and put too...
Related
I am new to this whole WSDL thing and I am having a problem dealing with one of it.
I have a URl which I suppose is an API to the service I need to work on. The URL looks like this
http://mail.domain_name.com.au:8101/AXAIf/AXServiceIIS/xppservice.svc?wsdl
This is a password protected web service and i have the access credentials to it.
My primary requirement is:
To verify if the API is working
I need to send some data to this web service and capture the response from it.
As per my study WSDL is a defination lagugage which defines the necessary information for the web sevice.
So my question is :
How can I test if the API is working from above url and the Authentication credentials using PHP?
Am I suppose to get the location and function from the above wsdl Url?
Can someone help me out here.And make me clear on my above queries?
That would be a great help.
Thanks in Advance. Any help would be appreciated.
I'm using the LinkedIn api and would like to access companies but I'm running into a vague error that I haven't been able to figure out.
I'm using php and the php libracy 'Happyr\LinkedIn\LinkedIn' to access the API. My current application also has the 'rw_company_admin' permission attached to it.
When I make a call to the api endpoint '/v1/people/~:(id,first-name,last-name)', I get the correct response.
But when I make a call to the '/v1/companies?format=json&is-company-admin=true' endpoint I get the following error:
"Invalid company query request"
When I perform the exact same query in the LinkedIn Rest Console, I get the response I'm looking for. Any ideas?
Figured it out after hours of debugging.
The issue will probably be specific to the php package mentioned in the question. The LinkedIn library in use was automatically appending 'format=json' to the query call which sparked an error.
By removing the default output setting in the library, the call worked fine.
In my case, it was related to permissions of the application.
If you want to retrieve company list of the user, you should check rw_company_admin permission in the settings page of the application or give it to scope parameter. Then, you should get a new access token and make requests with it.
So a while back I used to use the twitter json search in one of my apps but it seems since the change in API versions there has been some major changes which even after reading the documentation I still can't get my head around and it really doesn't make it very easy to understand so hopefully one of you tech guys out there can help me out.
I want to clean my application up so it works again in plainly doing the following:-
http://search.twitter.com/search.json?
q='+param+'&
rpp=100&
result_type=recent&
lang=en
Obviously with the changes this is no longer possible but I want to be able to do this again using the new address but in JQuery unless someone can suggest either a tutorial or a piece of code or even a link to a topic where I could get my answer. I'm also open to using PHP as this is what I used at one point with searching Facebook's timeline and you can get an access token using $.get() for Facebook so surely it would be the same with Twitter too?
Any advice/code is welcome.
Thanks!
the search API needs authorization now. I'd say that, first off, you need to call the https url not http.
With Abhramam William's library you'd do something like the following, after having received your app's bearer token:
$your_tweets = $connection->get("https://api.twitter.com/1.1/search/tweets.json?q=from:grey_mina&result_type=recent&count=5");
I want to use ajax to call php page, where php page creates a facebook event using facebook api.
I tried it, but it didn't work , did i make something wrong or it is not allowed to use ajax with facebook api ?
It should work as long as you get the correct access for the user. Are you getting an error?
How can I remotely make a post to a user's blog after he/she gives me his login info using the wordpress api? What method do i need to use, what paremeters should it have, etc? Sample code will be great.
I'd prefer to use the XML-RPC api but others will also be acceptable.
yeah you can use metaWeblog.newPost or blogger.newPost, an example of the first:
http://www.wprecipes.com/post-on-your-wordpress-blog-using-php
uses curl and xmlrpc_encode_request
an example of the second:
http://www.nickycakes.com/post-to-wordpress-remotely-with-xmlrpc-in-php/
yeah and #Francis is correct
I personally use the JSON API plugin. Create a post using:
http://www.example.com/api/create_post/?nonce=123456789&title=My%20Post&status=publish