I've application in php and in that I've to fetched all connection of my network from this rest API.
http://api.linkedin.com/v1/people/~/connections?modified=new
But It gives wrong member id. I've checked the same API result in LinkedIn rest console (https://developer.linkedin.com/rest-console) but it gives the different output.
Output with Console :
<person>
<id>nzdqEWJjKM</id>
<first-name>Sagar</first-name>
<last-name>Modi</last-name>
<headline>Sr. HR Officer - Generalist at MAS Financial Services Ltd.</headline>
<picture-url>http://m3.licdn.com/mpr/mprx/0_3vxs_YPyEsnVrHXzT-Jd_pvlox-zraqzitwL_pt_zJ6LfEivSP7nDy6SXttoPdzJhngkuU2v-HG2</picture-url>
<api-standard-profile-request>
<url>http://api.linkedin.com/v1/people/nzdqEWJjKM</url>
<headers total="1">
<http-header>
<name>x-li-auth-token</name>
<value>name:PSbh</value>
</http-header>
</headers>
</api-standard-profile-request>
<site-standard-profile-request>
<url>http://www.linkedin.com/profile/view?id=54732271&authType=name&authToken=PSbh&trk=api*a108281*s116823*</url>
</site-standard-profile-request>
<location>
<name>Ahmedabad Area, India</name>
<country>
<code>in</code>
</country>
</location>
<industry>Human Resources</industry>
</person>
Output with rest API from my application :
<person>
<id>7dmJjxBx_k</id>
<first-name>Sagar</first-name>
<last-name>Modi</last-name>
<headline>Sr. HR Officer - Generalist at MAS Financial Services Ltd.</headline>
<picture-url>http://m3.licdn.com/mpr/mprx/0_3vxs_YPyEsnVrHXzT-Jd_pvlox-zraqzitwL_pt_zJ6LfEivSP7nDy6SXttoPdzJhngkuU2v-HG2</picture-url>
<api-standard-profile-request>
<url>http://api.linkedin.com/v1/people/7dmJjxBx_k</url>
<headers total="1">
<http-header>
<name>x-li-auth-token</name>
<value>name:PSbh</value>
</http-header>
</headers>
</api-standard-profile-request>
<site-standard-profile-request>
<url>http://www.linkedin.com/profile/view?id=54732271&authType=name&authToken=PSbh&trk=api*a184885*s193024*</url>
</site-standard-profile-request>
<location>
<name>Ahmedabad Area, India</name>
<country>
<code>in</code>
</country>
</location>
<industry>Human Resources</industry>
</person>
please see the tag is different in both the output.
Can anyone help in this?
Each linkedin application has its own set of unique IDs. The API keys you are using are different from the keys used by the console, this is why you get different IDs.
This is in place in order to ensure that Linkedin data cannot be easily captured by spammers. If the IDs would have been the same, a spammer would setup hundreds of applications, and fetch a number of profile data from each application. Linkedin wants to keep its user data secure.
Related
I'm trying to add UDID fields to PNRs using the SOAP API. There is no mention of such functionality anywhere in the docs!
So I tried using the SabreCommandLLSRQ endpoint to attach the UD fields, but I don't seem to be able to make any changes, despite receiving a * response.
I've tried the following command using the endpoint:
5.S*RL[record locator]*UD56 [some test value]
For example:
5.S*RLEPLHYN*UD56 YVRYEG
But that also leads to a * response without the PNR actually changing.
Are you sure that's the right UDID format? I've never seen a record locator prepended to a UDID before. If using the SabreCommandLLSRQ endpoint I would expect your format to look like this:
5.S*UD56 [some test value]
There are many UDID formats so I may be wrong there and I know the responses can be quirky. What response do you get in a PNR if you simply enter your format into Sabre Red?
There is also support for itin remarks in the Add Itinerary Remark (AddRemarkLLSRQ), which may be worth implementing for you as well.
I found it in the API too, it is only mentioned in one of many examples in AddRemarkRQ:
If you want it to show up on the itinerary:
<AddRemarkRQ xmlns="http://webservices.sabre.com/sabreXML/2011/10" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Version="2.1.1">
<RemarkInfo>
<Remark Type="Invoice">
<Text>
U45-111794
</Text>
</Remark>
</RemarkInfo>
</AddRemarkRQ>
If you don't want it to show up on the itinerary:
<AddRemarkRQ xmlns="http://webservices.sabre.com/sabreXML/2011/10" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Version="2.1.1">
<RemarkInfo>
<Remark Type="Invoice">
<Text>
U*45-111794
</Text>
</Remark>
</RemarkInfo>
</AddRemarkRQ>
I've tested it in both CreatePassengerNameRecordRQ and AddRemarkRQ contexts.
I am in charge of Web Design and Marketing for the company I work for. I kind of got thrown into the role of Coding.
We use an eCommerce software to help with site structure and product information. This site uses Classic ASP to form all pages in order to make the process easier.
Well now I have been given an XML Data Feed instructions, but I have no idea where to begin. I have read some different posts, but none really give examples of what I am trying to do.
What I need to do is submit a request to "https://ec.synnex.com/SynnexXML/PriceAvailability" which is password protected and get the return xml.
Request sent to https://ec.synnex.com/SynnexXML/PriceAvailability using below xml:
<?xml version="1.0" encoding="UTF-8" ?>
<priceRequest>
<customerNo>YOUR_ID</customerNo>
<userName>USERNAME</userName>
<password>PASSWORD</password>
<skuList>
<mfgPN>PRODUCTPARTNUMBER</mfgPN>
<lineNumber>1</lineNumber>
</skuList>
</priceRequest>
and it will return the xml:
<?xml version="1.0" encoding="UTF-8" ?>
<priceResponse>
<customerNo>YOUR ACCOUNT NUMBER</customerNo>
<userName>YOUR ID</userName>
<PriceAvailabilityList>
<mfgPN>108R00645</mfgPN>
<mfgCode>13439</mfgCode>
<status>Active</status>
<description>IMAGING UNIT, PHASER 6300/6350</description>
<GlobalProductStatusCode>Active</GlobalProductStatusCode>
<price>228.48</price>
<totalQuantity>240</totalQuantity>
<AvailabilityByWarehouse>
<warehouseInfo>
<number>3</number>
<zipcode>94538</zipcode>
<city>Fremont, CA</city>
<addr>44211 Nobel Drive</addr>
</warehouseInfo>
<qty>30</qty>
</AvailabilityByWarehouse>
<AvailabilityByWarehouse>
<warehouseInfo>
<number>4</number>
<zipcode>30071</zipcode>
<city>Norcross, GA</city>
<addr>200 Best Friend Court, Suite# 250</addr>
</warehouseInfo>
<qty>27</qty>
</AvailabilityByWarehouse>
<AvailabilityByWarehouse>
<warehouseInfo>
<number>5</number>
<zipcode>75081</zipcode>
<city>Richardson, TX</city>
<addr>660 N Dorothy Drive, Suite 100</addr>
</warehouseInfo>
<qty>2</qty>
</AvailabilityByWarehouse>
<lineNumber>1</lineNumber>
</PriceAvailabilityList>
</priceResponse>
I have no idea even where to even begin with this.
Once I get the information sent and it comes back I'm sure I can assign a Dim Value and then use the call for the value in the code I already have for displaying our products. <%=whatevervalue%>
Any help would be much appreciated.
I am using Gracenote video services for the programming guide in my application. Within the guide, I display channel logos along with the channel name and number. In the past, I have retrieved channel logo URLs by using the URL_GET API query with the mode set to TVCHANNEL_IMAGE. Within the body of the query, I would include the Gracenote IDs for a set of channels (found in a TVCHANNEL_LOOKUP response). Below is an example query.
<QUERIES>
<AUTH>
<CLIENT>XXXXXXXX-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</CLIENT>
<USER>XXXXXXXXXXXXXXXXXX-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</USER>
</AUTH>
<QUERY CMD="URL_GET">
<MODE>TVCHANNEL_IMAGE</MODE>
<GN_ID>251535939-B76CB793D827E8BE713DAEB9675ADED4</GN_ID>
<GN_ID>251539612-E293EAF3F3164B292AD102532BCB9AF9</GN_ID>
</QUERY>
</QUERIES>
The response to the query would return URLs that I could then download the logos from. This was working fine up until one week ago. Now, the response returns with no match.
<RESPONSES>
<RESPONSE STATUS="NO_MATCH">
</RESPONSE>
</RESPONSES>
Has the API for retrieving channel logos changed? If so, how and what is the new method for getting channel logos? Ideally, I would like to continue downloading logos on demand through an API similar to URL_GET.
Are you still able to reproduce this? I get a valid response back using your query example
<RESPONSES>
<RESPONSE STATUS="OK">
<TVCHANNEL>
<GN_ID>251535939-B76CB793D827E8BE713DAEB9675ADED4</GN_ID>
<URL TYPE="IMAGE" SIZE="110" WIDTH="67" HEIGHT="50">http://akamai-b.cdn.cddbp.net/cds/2.0/image/E9F4/7FE7/D525/9746_110.png</URL>
</TVCHANNEL>
<TVCHANNEL>
<GN_ID>251539612-E293EAF3F3164B292AD102532BCB9AF9</GN_ID>
<URL TYPE="IMAGE" SIZE="110" WIDTH="67" HEIGHT="50">http://akamai-b.cdn.cddbp.net/cds/2.0/image/F1D1/F628/A3FE/79E0_110.png</URL>
</TVCHANNEL>
</RESPONSE>
</RESPONSES>
I am attempting to pull all the General Ledger entries from QuickBooksOnline into my C# Asp.net application for a given date range. I have been able to successfully pull Bills, Checks, and JournalEntries that match the Profit and Loss Detail report I'm using for reference. However, I seem to be missing all "Deposit" types from that report. I am pulling data for Invoices and Payments but they are coming back empty for the TxnDates I'm looking for.
In case it helps I'm including the Request and Response xml logs for Invoices and Payments.
Invoice Request
Filter=TxnDate :AFTER: 2013-02-28T00:00:00-05:00 :AND: TxnDate :BEFORE: 2013-04-01T00:00:00-04:00&PageNum=1&ResultsPerPage=100
Invoice Response
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><qbo:SearchResults xmlns="http://www.intuit.com/sb/cdm/v2" xmlns:qbp="http://www.intuit.com/sb/cdm/qbopayroll/v1" xmlns:qbo="http://www.intuit.com/sb/cdm/qbo"><qbo:CdmCollections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="Invoices"/><qbo:Count>0</qbo:Count><qbo:CurrentPage>1</qbo:CurrentPage></qbo:SearchResults>
Payment Request
Filter=TxnDate :AFTER: 2013-02-28T00:00:00-05:00 :AND: TxnDate :BEFORE: 2013-04-01T00:00:00-04:00&PageNum=1&ResultsPerPage=100
Payment Response
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><qbo:SearchResults xmlns="http://www.intuit.com/sb/cdm/v2" xmlns:qbp="http://www.intuit.com/sb/cdm/qbopayroll/v1" xmlns:qbo="http://www.intuit.com/sb/cdm/qbo"><qbo:CdmCollections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="Payments"/><qbo:Count>0</qbo:Count><qbo:CurrentPage>1</qbo:CurrentPage></qbo:SearchResults>
Deposits are not the same thing as an invoice or a payment. Deposits are a separate transaction indicating a deposit of a payment, to the bank.
According to Intuit's documentation, querying for deposits is not supported by the v2 APIs.
I'm trying to figure out what's the correct RESTful way to structure an URL for user interactions with other entities?
For example, I have three entities: users, posts and tags.
How do you represent "user likes post", "user follows tag" or "user follows user".
This is what I had in mind, but I'm not sure if it's the correct way to do it:
POST /user/:id/like/post/:id (user likes post)
POST /user/:id/follow/user/:id (user follows another user)
Looks very semantic, but I'm not sure about the POST method
Fair warning: I am a newbie to REST as well.
Some general remarks, taken from RESTful Web Services by Leonard Richardson and Sam Ruby:
use plural for your resource names
use POST to the resource name if the server controls the identity of the resource
use PUT to the resource/:id if the client controls the identity of the resource
Applying that to your situation I can see the following resources
/users : list of users
/users/{id} : specific user
/users/{id}/tags : list of tags used by this specific user
/users/{id}/posts : list of posts liked by this specific user
/users/{id}/follows : list of users that this specific user is following
To add a post to the ones liked by a user, I would POST to /users/{id}/posts with the identification of the post(s) that are to be added to the list of liked posts in the request body.
Similary to record that user 1 is now also following user 200 and 300, I'd POST to /users/{id}/follows with the identifications of those users in the request body.
After all you are not supplying the identification of the relationship between user 1 and the other two users, but you are adding two new relationship resources that have user 200 and user 300 as their "follows user" attribute respectively.
A database backing your app would most likely have a Users table, a Posts table and a Likes where the Likes table is the one being added to when you record that a User likes a Post. And the identification of the Likes record will not be the User's identification nor the Post's identification, but it will have its own identification (separate or as a combination of the User's and Post's identifications).
Even if you were to store the Posts liked by a User in something other than a relational model, possibly even without separate identifications for the Likes', the identification of each Likes would still be the combination of the User and the Post.
RESTful interfaces have a single well known URL as a starting point. From there every other action and entity should be accessed by hypermedia controls provided in the responses. In that sense, the URL structure should not matter at all and should not matter to the client. They could be completely opaque (e.g., like http://bit.ly/9xhUgg) and the clients will still be able to work.
Here is some useful reading:
Richardson Maturity Model
A RESTful Hypermedia API in Three Easy Steps
Having said that, from a server implementation point of view, it will easier using a structure like the one you have suggested. Something like:
GET /
<myapplication href="/">
<users href="/users"/>
<posts href="/posts"/>
<tags href="/tags"/>
</myapplication>
GET /users
<users href="/users">
<user username="johndoe" href="/users/1234"/>
<user username="janedoe" href="/users/1235"/>
<next href="/users?page=2"/>
<search href="/users">
<name type="string" cardinality="required"/>
</search>
</users>
GET /users?page=2
<users href="/users">
<user username="bobgeldof" href="/users/1236"/>
<user username="biancajager" href="/users/1237"/>
<next href="/users?page=3"/>
<prev href="/users"/>
<search href="/users">
<name type="string" cardinality="required"/>
</search>
</users>
GET /users/1236
<user username="bobgeldof" href="/users/1236">
<posts-liked href="/users/1236/posts"/>
<tags-followed href="/users/1236/tags"/>
<users-followed href="/users/1236/users"/>
<like-post href="/users/1236" method="PUT">
<post type="URL" cardinality="required"/>
</like-post>
<follow-tag href="/users/1236" method="PUT">
<tag type="URL" cardinality="required"/>
</follow-tag>
<follow-user href="/users/1236" method="PUT">
<user type="URL" cardinality="required"/>
</follow-user>
</user>
The important thing to not in the above is that when a post is being liked, or a tag or user is being followed, the URI for the post, tag or user is what is submitted as a parameter, not an ID. BTW the reason I use PUT for those operations is that the action is idempotent. If it wasn't I would use POST instead.
GET /users/1236/posts
<liked-posts href="/users/1236/posts">
<post href="http://stackoverflow.com/questions/11566436" title="What's the RESTful way to structure an URL for user interactions with other entities?">
<unlike href="/users/1236/posts?href=http%3A%2F%2Fstackoverflow.com%2Fquestions%2F11566436" method="DELETE"/>
</post>
...
<next href="/users/1236/posts?page=2"/>
</liked-posts>
GET /users/1236/users
<followed-users href="/users/1236/users">
<user username="biancajager" href="/users/1237">
<unfollow href="/users/1236/users?href=%2Fusers%2F1237" method="DELETE">
</user>
<user username="Jorge Pedret" href="http://stackoverflow.com/users/201092/jorge-pedret">
<unfollow href="/users/1236/users?href=http%3A%2F%2Fstackoverflow.com%2Fusers%2F201092%2Fjorge-pedret" method="DELETE"/>
</user>
<next href="/users/1236/users?page=2"/>
</followed-users>
The thing I really like about the above (besides it being truly RESTful) is that because you are using URLs instead of IDs, you can like and follow posts and users in other systems. :)