RESTClient
class RESTClient implements LogicInterface, Renderer
PHP REST-client for BibSonomy API and PUMA API.
Methods
No description
POST /users/[userName]/concepts/[conceptName]
Adds a document to a post.
We create a UserRelation of the form (sourceUser, targetUser)\in relation sourceUser should be logged in for this
DELETE /users/[username]/concepts/[conceptname]
Deletes an existing document. If the resourceHash is given, the document is assumed to be connected to the corresponding resource (identified by the user name in the document). Otherwise the document is independent of any post.
Removes the given post - identified by the connected resource's hash - from the user.
GET /users/[userName]/concepts/[conceptName] GET /concepts/[conceptName]
/concepts
Get a document from a publication resource.
/groups/[groupName]
/groups
Returns details to a post. A post is uniquely identified by a hash of the corresponding resource and a username.
No description
/tags/[tag]
No description
/tags ?filter=[regex] ?(user|group|viewable)=[username/groupname] ?order=(frequency|alph)
/users/[username]
GET /groups/[groupName]/users
URL: /users
PUT /users/[username]/concepts/[conceptname]
Updates the post(s) in the database.
Publication List of the requested API Result, rendered in given CSL Style
BibTeX Representation of the requested API Result.
Endnote representation of the requested API Result.
Model Object representation of the requested API Result.
XML Representation of the requested API Result.
No description
No description
Returns the Query object of the last used request. Null, if no request has been called before.
Details
at line 57
__construct(Accessor $accessor)
at line 71
RESTClient
changeDocumentName(string $filePath, string $resourceHash, string $userName, Document $document)
at line 93
RESTClient
createConcept(Tag $concept, string $conceptName, string $userName)
POST /users/[userName]/concepts/[conceptName]
Create a new relation/concept note: if a concept already exists with the given name it will be replaced
at line 111
RESTClient
createDocument(string $filePath, string $resourceHash, string $userName)
Adds a document to a post.
at line 129
RESTClient
createPosts(Post|Posts $posts, string $userName)
POST /api/users/[username]/posts
Add post(s) to an user's collection.
at line 147
RESTClient
createUserRelationship(User $sourceUser, User $targetUser)
We create a UserRelation of the form (sourceUser, targetUser)\in relation sourceUser should be logged in for this
at line 166
RESTClient
deleteConcept(string $conceptName, string $userName)
DELETE /users/[username]/concepts/[conceptname]
Delete an existing concept
at line 187
RESTClient
deleteDocument(string $userName, string $resourceHash, string $fileName)
Deletes an existing document. If the resourceHash is given, the document is assumed to be connected to the corresponding resource (identified by the user name in the document). Otherwise the document is independent of any post.
at line 204
RESTClient
deletePosts(string $userName, string $resourceHash)
Removes the given post - identified by the connected resource's hash - from the user.
at line 225
RESTClient
getConceptDetails(string $conceptName, string $userName)
GET /users/[userName]/concepts/[conceptName] GET /concepts/[conceptName]
Retrieve Details for a concept, containing the belonging subTags.
at line 249
RESTClient
getConcepts(string $resourceType, string $grouping, string $groupingName, string $regex, array $tags, string $status, int $start, int $end)
/concepts
Retrieve relations
at line 268
RESTClient
getDocumentFile(string $userName, string $resourceHash, string $fileName, string $type = Config\DocumentType::FILE)
Get a document from a publication resource.
at line 286
RESTClient
getGroupDetails(string $groupName)
/groups/[groupName]
Returns details of one group.
at line 305
RESTClient
getGroups(int $start, int $end)
/groups
Returns all groups of the system.
at line 326
RESTClient
getPostDetails(string $userName, string $resourceHash, string $format = 'xml')
Returns details to a post. A post is uniquely identified by a hash of the corresponding resource and a username.
at line 353
RESTClient
getPosts(string $resourceType = Config\Resourcetype::BIBTEX, string $grouping = Config\Grouping::USER, string $groupingName = '', array $tags = array(), string $resourceHash = '', string $search = '', string $format = 'xml', int $start, int $end = 20)
at line 378
RESTClient
getTagDetails(string $tagName)
/tags/[tag]
Returns details about a tag. Those details are:
- details about the tag itself, like number of occurrences etc
- list of subtags
- list of supertags
- list of correlated tags
at line 395
RESTClient
getTagRelation(integer $start, integer $end, string $relation, string $tagName)
at line 423
RESTClient
getTags(string $grouping, string $groupingName, string $regex, string $order, integer $start, integer $end)
/tags ?filter=[regex] ?(user|group|viewable)=[username/groupname] ?order=(frequency|alph)
Returns a list of tags which can be filtered.
at line 441
RESTClient
getUserDetails(string $userName)
/users/[username]
Returns details about a specified user
at line 459
RESTClient
getUserListOfGroup(string $groupName, integer $start, integer $end)
GET /groups/[groupName]/users
at line 478
RESTClient
getUsers(integer $start, integer $end)
URL: /users
Generic method to retrieve lists of users
at line 497
RESTClient
updateConcept(Tag $concept, string $userName, string $operation = null)
PUT /users/[username]/concepts/[conceptname]
Update an existing relation/concept
at line 514
RESTClient
updatePosts(ModelObject $posts, string $userName, string $resourceHash)
Updates the post(s) in the database.
at line 532
string
bibliography(string $bibliographyStyleName = 'apa', string $lang = 'en', string $bibliographyStyle = null)
Publication List of the requested API Result, rendered in given CSL Style
at line 544
string
bibtex()
BibTeX Representation of the requested API Result.
at line 556
stdClass
csl()
CSL Representation of the requested API Result.
at line 568
string
endnote()
Endnote representation of the requested API Result.
at line 578
ModelObject
model()
Model Object representation of the requested API Result.
at line 590
string
xml()
XML Representation of the requested API Result.
at line 600
StreamInterface
file()
at line 614
string
getBody()
at line 624
AbstractQuery
getQuery()
Returns the Query object of the last used request. Null, if no request has been called before.