I'd like to get information about a rating (fivestars) of one of an app item.
I've tried to do it using two requests:
/rating/item/1********9
and
/item/1********9?mark_as_viewed=false
Both via https://developers.podio.com/.
I'm receiving only the response (related to ratings):
"ratings":{
"like":{
"average":null,
"counts":{
"1":{
"total":0,
"users":[
]
}
}
}
},
In the GUI I can see my vote (3 stars).
Could you please help me with how I could get the rating?
Thanks for your help!
Adding a star rating to a Podio app is actually creating a Voting object (I know it's not very intuitive). I believe the endpoint you're looking for is Get result of voting on an item.
Related
Using NodeJS, I am trying to update relationship field which link to another app (contacts-leads). I have try all combination but still getting error. I think I have the necessary data to post, app_id, item_id, external_id..etc. I need help with forming JSON structure.
p.request('put','item/<Item_Id>/value', data)
var data {....}
app_id:'<app_id>'
value:'<value>' (value is the app_item_id of the link to application; that is the number in URL)
app_item_id: '<app_item_id>'
external_id:'<external_id>'
I was able to update non-relationship field without problem.
Thanks
Well, going to answer my own question. That will work for single app link, not sure about multiple ones.
data = {
"<external_id>": {
"apps": [{"app_id": <app_id>}],
"value: <app_item_id>
}
}
I'm using the Upsource API to get the revisions and reviews.
Does anyone know which method to use to get the reviews summary?
Review Summary
I've tried getReviewSummaryChanges, getReviewSummaryDiscussions, but I didn't get what I needed.
Thank you
You can try other methods as described in the documentation:
https://upsource.evolutiongaming.com/~api_doc/reference/index.html
Try POST with "getFeed" method to get complete set of changes happening to a review : including "addedRevisions":
https://upsource-host/~rpc/getFeed
{
"limit": 20,
"type": 2,
"projectId":"myproject",
"reviewId":"MYPROJECT-CR-123"
}
Please check my previous question
EMBER JS - Fetch associated model data from back-end only when required
Related to the above question I need help on API formation in ruby on rails(JSON format: jsonapi.org)
how to form the API for sideloading only students.records and link with data already available in ember-data store (school and students)
based on the comments in the other question, I think you're wanting something like
GET /api/students?include=records
But you need that filtered to a school, which is where application-specific code can come in, as { json:api } does not dictate how filtering should happen
but, I've used this: https://github.com/activerecord-hackery/ransack with much success
So, your new query would be something like:
GET /api/students?include=records&q[school_id_eq]=1
to get all students and their records for the school with id 1
and then to make this query in ember:
store.query('student', {
include: 'records',
q: {
['school_id_eq']: 1
}
});
hope this helps
I am looking for a more detailed list of possible API responses when using Yodlee's REST API. Think of it as an XSD response but for a JSON string. I want to know if there are possible data elements that are not listed Yodlee's JSON response examples.
The only info I can really find so far is here.
When I review these examples, it appears that the example JSON responses do not fully describe every field.
Here is part of the getItemSummaryForItem1 JSON example for maturityDate element
"maturityDate":{
},
It looks like there is an array, but the possible data elements for that maturityDate array are undeclared. Then later on maturityDate is shown to be:
"maturityDate":{
"date":"0014-02-01T00:00:00-0800",
"localFormat":"dd/MM/yyyy"
},
And then in another example from getUserTransactionCategories
{
"categoryId":31,
"categoryName":"Retirement Income",
"transactionCategoryTypeId":2,
"isBudgetable":1,
"localizedCategoryName":"Retirement Income",
"isHidden":false,
"categoryLevelId":3
},
Based on that I would think all possible data elements are there.
But then there is another one which introduces the childCategory data element
{
"categoryId":2,
"categoryName":"Automotive Expenses",
"isDeleted":0,
"transactionCategoryTypeId":4,
"isBudgetable":1,
"localizedCategoryName":"Automotive Expenses",
"isHidden":false,
"categoryLevelId":3,
"childCategory":[
{
"categoryId":5641,
"categoryName":"1_SubCategory1",
"categoryDescription":"Subcategory desc1",
"isDeleted":0,
"isBudgetable":0,
"localizedCategoryName":"1_SubCategory1",
"isHidden":false,
"parentCategoryId":2,
"categoryLevelId":4
}
}
Thanks!
Yodlee team is working on to get this details documented, this is a time taking process and will be soon available over their portal. Meanwhile, is there any specific field or API response for which you are looking to get all the child elements which will help you out without blocking your integration?
Let's say I have a REST API, which has basic methods to retrieve users and the photos of a user. For example:
// Get a user:
GET /user/123
// Get the photos of a user:
GET /user/123/photos
// Get a photo:
GET /photo/789
This is quite straightforward, however now I also need a method to retrieve the number of photos for a particular user. I don't want to retrieve all the photos because that would slow everything down and is not necessary. What would be the best way to do that in a REST API?
I thought about implementing something like GET /user/123/photo_count however "photo_count" is not a resource so that doesn't seem right.
How would I go about presenting this kind of information properly in a REST API?
// Get the photos of a user:
GET /user/123/photos
This does not have to actually return the photos, it could return just a list of links.
It could even be a partial list of the first n links with information on the total number, and links to get the next/prev batch.
You could do something a little "custom" like returning the count as a response header. Then to just get the count you would issue a HEAD which should return the headers with no response body (i.e.. not actually load the photos).
GET /user/123/photos
==>
Headers:
X-Count 23
Body:
<photos>
<photo id="1">...</photo>
<photo id="2">...</photo>
...
</photos>
HEAD /user/123/photos
==>
Headers:
X-Count 23
Body:
none
Like the comment on the original post, you can return the photo count as a property of your user "object". The GET /user/123 call would simply return an object/json/xml that contains the number of pictures as a property.