Recommendations - Huddle/huddle-apis GitHub Wiki
Recommendations represent the list of recommended documents for a given user.
Operation |
---|
Retrieving a list of recommended documents |
You can GET the recommended documents for a user and this will display a relevance ordered list of recommended documents based on the actions of the given user.
Recommendations will only return the top 50 recommended documents.
Please see Document for more details of this resource.
In this example we are asking for the list of recommendations for user with id 123.
GET /documents/recommendations/123 HTTP/1.1
Accept: application/vnd.huddle.data+xml
Authorization: OAuth2 frootymcnooty/vonbootycherooty
HTTP/1.1 200 OK
Content-Type: application/vnd.huddle.data+xml
<recommendations xmlns="http://schema.huddle.net/2011/02/">
<link rel="self" href="..." />
<recommendation>
<document title="..." description="...">
<link rel="self" href="..." />
... other document elements ...
</document>
<workspace title="...">
<link rel="self" href="..." />
</workspace>
</recommendation>
<recommendation>
<document title="..." description="...">
<link rel="self" href="..." />
... other document elements ...
</document>
<workspace title="...">
<link rel="self" href="..." />
</workspace>
</recommendation>
</recommendations>
<recommendations xmlns="http://schema.huddle.net/2011/02/">
<link rel="self" href="..." />
<recommendation>
<document title="..." description="...">
<link rel="self" href="..." />
... other document elements ...
</document>
<workspace title="...">
<link rel="self" href="..." />
</workspace>
</recommendation>
<recommendation>
<document title="..." description="...">
<link rel="self" href="..." />
... other document elements ...
</document>
<workspace title="...">
<link rel="self" href="..." />
</workspace>
</recommendation>
</recommendations>
Request with parameter
GET /documents/recommendations/123 HTTP/1.1
Accept: application/vnd.huddle.data+xml
Authorization: OAuth2 frootymcnooty/vonbootycherooty
Name | Description |
---|---|
recommendation | A recommendation element is a representation of the single recommended Document for the user. |
Name | Description | Methods |
---|---|---|
self | The current URI of this recommendation list. | GET |
start = recommendations
recommendations = element h:recommendations {
link+,
recommendation+
}
recommendation = element h:recommendation {
link+,
element h:document{},
element h:workspace{}
}