OAuth Console Not Returning all fields for Honors and Awards - oauth

I'm new here, so please bear with me if I am posting to the wrong place.
When using the OAuth console, I am not able to retrieve all the fields under 'Honors & Awards' (URL: http://api.linkedin.com/v1/people/~/honor-awards). It appears I am only able to retrieve the id, name and issuer attributes.
<honors-awards total="2">
<honor-award>
<id>2</id>
<name>Test Honors</name>
<issuer>体育爱好者协会</issuer>
</honor-award>
<honor-award>
<id>3</id>
<name>Test Honors2</name>
<issuer>TS</issuer>
</honor-award>
</honors-awards>
Also, under the profile fields documentations, certifications appears to have 6 attributes in total, but when returning the XML when using http://api.linkedin.com/v1/people/~/certifications as the URL in the OAuth console, it only returns the following:
<certifications total="1">
<certification>
<id>4</id>
<name>Test Certification</name>
</certification>
</certifications>
Might there be something wrong that I am doing? Any comment would be greatly appreciated. Thanks!

I had the same problem. For some reason you have to specify fields for all the children of some collections. See examples of getting the syntax here:
How to Retrieve all possible information about a LinkedIn Account
If you use the JS API, it will be specified in the .fields such as:
.fields(["id", "firstName", "lastName", "certifications:(id,name,authority:(name),number,start-date,end-date)"])

Related

jira createmeta not showing all customfields

If I navigate to /rest/api/2/issue/createmeta/PROJ/issuetype/N (in this case, I'm getting Task), the list of fields returned is incomplete. There are a number of customfields that are in use (I can see them both in the tickets themselves, and also in /plugins/servlet/project-config/PROJ/fields ) that are in the createmeta data.
I'm really trying to do this in python jira, where I'm using "expand='projects.issuetypes.fields'" in the createmeta() call, but I figured I'd double-check the results in the rest API directly, and I'm getting the same results there, too.
This is happening in jira 8.20.7.
Essentially, what I'm trying to do, is to programatically get a name/id mapping of all fields in the ticket type. I'm having far more difficulty doing that than I thought there would be. I would do it based on /rest/api/2/field but the jira admins have allowed some duplicated names...
EDIT: I realized that it might be worth noting that some of the fields I'm looking for are coming from a ServiceDesk form, although, as far as I can tell, there's no way to determine that, since one of the missing fields contains the name of the form.
Why are you using createmeta endpoint?
Instead of that, in order to get all of the customfields and their values; just note their id and get the values from /rest/api/2/issue/{issueKey} endpoint.
When you send a GET request to /rest/api/2/issue/{issueKey} endpoint, you will get a JSON object which contains "fields" object in it.
And using the "fields" you can determine all of the values that include system fields (description, assignee, etc.) and custom fields (like customfield_<customfieldid>).
And for a general approach, you may want to look at the field types in that response.

readMask value to get the display names form new GMB API

I am running this line of code:
location_list = self.service_mbbi_v1.accounts().locations().list(parent=account_name,readMask='name').execute()
And I get the list of the location IDs but I don't manage to get the Location display name, the display name, not just the ID. I wrote google and told them about my issue and they told me they are looking into it but it has been 2 weeks and no response yet. So just wanted o see if someone else had the same issue and if they fpund a solution or a workaround.
The documentation provides only an example, not a list of possible values:
https://developers.google.com/my-business/reference/businessinformation/rest/v1/accounts.locations/list
And even when I try the example value of the readMask flag I get an error:
[{'#type': 'type.googleapis.com/google.rpc.BadRequest', 'fieldViolations': [{'field': 'read_mask', 'description': 'Invalid field mask provided'}]}]">
I found this similar question:
Google Business Profile API readMask
The example they provide work for me but I still can't get the display name value.
I thought of using the google place ID I get from the metadata response and see if I can use another API to find the name but it feels they should be a proper 'readMask' string vale for the display name here and it is not 'displayName'..
Has anyone a hint of what can I do?
Thanks a lot
If you are trying to get the business name data, your readMask should be 'title'.

How to get to invoice link in invoices api

I am interested to have a invoice link/pdf from the api which returns the invoice using new freshbooks api endpoint https://api.freshbooks.com/accounting/account/<accountid>/invoices/<invoiceid>
Even including direct_links I am unable to get the link to the invoice. With direct_links it returns json with fields id, contactid, created_date, type, userid, objectid, token.
I currently work at FreshBooks.
Unfortunately these direct link tokens will only work with old FreshBooks, which isn't mentioned in the documentation -- I'll see if we can fix that.
Poking through, it doesn't look like we've has exposed a way to access a PDF version of the invoice through the public API just yet. But I'll pass that on to the appropriate channels and I'll update this answer if that changes.

How to access a reddit post using redditkit in ruby?

I have a reddit post link here:
https://www.reddit.com/r/dankmemes/comments/6m5k0o/teehee/
I wish to access the data of this post throught the redditkit API.
http://www.rubydoc.info/gems/redditkit/
I have tried countless times and the docs don't make too much sense to me. Can someone help show how to do this through the ruby console? Or even an implementation of this in rails would be really helpful!
Looking at the #comment method on the gem, it takes a comment_full_name and performs a GET to api/info.json with that parameter as an id (seen by viewing the source for that method). If we look at the reddit api for api/info the id parameter is a full name for the object with a link to what a full name is.
Following that link, a full name for a comment is
Fullnames start with the type prefix for the object's type, followed by the thing's unique ID in base 36.
and
type prefixes
t1_ Comment
So now we know the comment_full_name should be t1_#{comment's unique id} which appears to be 6m5k0o. Here, I'm unsure if that's already base36 or if they want you to convert that into base36 before passing it. Without seeing what all you've tried, I would say
client = RedditKit::Client.new 'username', 'password'
client.comment("t1_6m5k0o")
and if that doesn't work
client.comment("t1_#{'6m5k0o' base36 encoded}")
For questions like this, it would be nice to see some of your code and what you tried/results they gave. For all I know, you've already tried this and have a reason it didn't work for you.
I would test this out for you, but I don't have a reddit account for the gem to sign in with, this is just my guess glancing at the documentation.

What does the number refer to in link

I am looking at old posts to try and figure out what's wrong with the hackbook example at https://github.com/facebook/facebook-ios-sdk/tree/master/sample/Hackbook .
In this post, Post image to facebook using graph api , it seems that his problem was 117795728310/photos" instead of me/photos
What does 117795728310 refer to? I'm assuming it's not his app id. If it's his user id, where can I find out what mine is?
Thanks,
Mich
The paths of the open graph usually start with the id of the object and then it's connections.
For example: 6708787004/feed will return the feed for the South Park page.
The id can be replaced with a "username", so the above example is the same as "southpark/feed".
And "me/feed" is the same as "YOUR_USER_ID/feed"
You can get your id in all kind of ways, it will be easier to just check "/me" in the graph explorer.
The id you posted is not of a user but a page (graph explorer)
It does look like a User ID.
Go to http://www.facebook.com/note.php?note_id=91532827198 to see how you get yours

Resources