lastCollections instead of collections, to be more precise.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2016-12-10 21:56:19 +00:00 committed by SantiagoBragagnolo
parent d0fd052f26
commit b55ad15014
1 changed files with 9 additions and 12 deletions

View File

@ -12,22 +12,11 @@ Class {
#category : #Zotero
}
{ #category : #querying }
ZoteroLibrary >> collections [
"I return all the public collections for a particular group or user"
^ NeoJSONReader fromString: (ZnEasy get: self collectionsURL) contents
]
{ #category : #utility }
ZoteroLibrary >> collectionsURL [
"I provide the common part of the collections URL for the Zotero API"
groupID ifNotNil: [ ^ ZoteroAPI baseURL,'groups/',groupID,'/collections/' ].
userID
ifNotNil: [ ^ ZoteroAPI baseURL,'groups/',userID,'/collections/' ]
ifNil: [ self emptyValuesWarning ]
^ self groupURL, '/collections/'
]
{ #category : #utility }
@ -63,6 +52,14 @@ ZoteroLibrary >> groupURL [
ifNil: [ self emptyValuesWarning ]
]
{ #category : #querying }
ZoteroLibrary >> lastCollections [
"I return all the public collections for a particular group or user"
^ NeoJSONReader fromString: (ZnEasy get: self collectionsURL) contents
]
{ #category : #querying }
ZoteroLibrary >> lastItems [
"I return the last 25 items of the public collections for a particular group or user"