Sample outputs¶
Collection¶
CollectionModel
will return an instance with the following json structure:
{
"author": {"location": "",
"name": "TukTuk Design",
"permalink": "/tuktukdesign",
"username": "tuktukdesign"},
"author_id": "319644",
"date_created": "2014-06-15 13:59:41",
"date_updated": "2014-06-15 14:00:38",
"description": "",
"icon_count": "18",
"id": "220",
"is_collaborative": "",
"is_featured": "0",
"is_published": "1",
"is_store_item": "0",
"name": "Arrows-1",
"permalink": "/tuktukdesign/collection/arrows-1",
"slug": "arrows-1",
"sponsor": {},
"sponsor_campaign_link": "",
"sponsor_id": "",
"tags": ["arrow",
"arrows",
"up",
"down",
"left",
"right",
"up arrow",
"down arrow",
"left arrow",
"right arrow",
"up arrows",
"down arrows",
"left arrows",
"right arrows"],
"template": "24"
}
How this data may be accessed after a request is described in Model
.
Beyond this data, instances that were generated not as an element of a list will also have the following attribute:
response holding a requests.Response object of the request.
See Collection output handling for a code example of accessing this model’s data.
Collections¶
CollectionsModel
will return a list of CollectionModel
objects, each with the following json structure:
{
"author": {"location": "Islamabad, Capital, PK",
"name": "Flatart",
"permalink": "/Flatart",
"username": "Flatart"},
"author_id": "4478358",
"date_created": "2019-08-02 10:55:16",
"date_updated": "2019-08-02 10:55:16",
"description": "",
"id": "88003",
"is_collaborative": "",
"is_featured": "0",
"is_published": "1",
"is_store_item": "0",
"name": "Maps & Travel",
"permalink": "/Flatart/collection/maps-travel",
"slug": "maps-travel",
"sponsor": {},
"sponsor_campaign_link": "",
"sponsor_id": "",
"tags": [],
"template": "24"
}
A method returning CollectionsModel
in reality returns a list with some additional attributes:
collections holding a list of
DotDict
objects, each with a collection.response holding a requests.Response object of the request.
Furthermore, each element in the list may be accessed like Model
.
See Collections output handling for a code example of accessing this model’s data.
Icon¶
IconModel
will return an instance with the following json structure:
{
"attribution": "Coat Check by AIGA from Noun Project",
"collections": [{"author": {"location": "US",
"name": "AIGA",
"permalink": "/aiga-icons",
"username": "aiga-icons"},
"author_id": "3805019",
"date_created": "2012-01-27 19:15:26",
"date_updated": "2018-04-17 20:37:44",
"description": "",
"id": "3",
"is_collaborative": "",
"is_featured": "1",
"is_published": "1",
"is_store_item": "0",
"name": "Symbol Signs",
"permalink": "/aiga-icons/collection/symbol-signs",
"slug": "symbol-signs",
"sponsor": {},
"sponsor_campaign_link": "",
"sponsor_id": "",
"tags": [],
"template": "24"}],
"date_uploaded": "",
"icon_url": "<manually truncated>",
"id": "6",
"is_active": "1",
"is_explicit": "0",
"license_description": "public-domain",
"nounji_free": "0",
"permalink": "/term/coat-check/6",
"preview_url": "https://static.thenounproject.com/png/6-200.png",
"preview_url_42": "https://static.thenounproject.com/png/6-42.png",
"preview_url_84": "https://static.thenounproject.com/png/6-84.png",
"sponsor": {},
"sponsor_campaign_link": null,
"sponsor_id": "",
"tags": [{"id": 27, "slug": "coat-check"},
{"id": 28, "slug": "clothes-hanger"}],
"term": "Coat Check",
"term_id": 27,
"term_slug": "coat-check",
"updated_at": "2019-04-22 19:22:17",
"uploader": {"location": "US",
"name": "AIGA",
"permalink": "/aiga-icons",
"username": "aiga-icons"},
"uploader_id": "3805019",
"year": 1974
}
How this data may be accessed after a request is described in Model
.
Beyond this data, instances that were generated not as an element of a list will also have the following attribute:
response holding a requests.Response object of the request.
See Icon output handling for a code example of accessing this model’s data.
Warning
Some requests return slightly different values. For example, some collection icons have a attribution_preview_url, while some do not.
Icons¶
IconsModel
will return a list of IconModel
objects, each with the following json structure:
{
"attribution": "Double Tap by P.J. Onori from Noun Project",
"date_uploaded": "2012-05-21",
"icon_url": "<manually truncated>",
"id": "2913",
"is_active": "1",
"is_explicit": "0",
"license_description": "public-domain",
"nounji_free": "0",
"permalink": "/term/double-tap/2913",
"preview_url": "https://static.thenounproject.com/png/2913-200.png",
"preview_url_42": "https://static.thenounproject.com/png/2913-42.png",
"preview_url_84": "https://static.thenounproject.com/png/2913-84.png",
"sponsor": {},
"sponsor_campaign_link": null,
"sponsor_id": "",
"tags": [{"id": 4088, "slug": "double-tap"},
{"id": 2028, "slug": "finger"},
{"id": 2839, "slug": "interface"},
{"id": 443, "slug": "ipad"},
{"id": 440, "slug": "iphone"},
{"id": 908, "slug": "mobile"},
{"id": 1293, "slug": "screen"},
{"id": 1393, "slug": "tablet"},
{"id": 2816, "slug": "touch"}],
"term": "Double Tap",
"term_id": 4088,
"term_slug": "double-tap",
"updated_at": "2019-04-22 19:22:17",
"uploader": {"location": "San Francisco, US",
"name": "P.J. Onori",
"permalink": "/somerandomdude",
"username": "somerandomdude"},
"uploader_id": "5652",
"year": 2009
}
A method returning IconsModel
in reality returns a list with some additional attributes:
icons holding a list of
DotDict
objects, each with an icon.collection holding a
DotDict
object, with the collection the icons come from. (Only forget_collection_icons()
)generated_at holding a string indicating when the request was generated.
response holding a requests.Response object of the request.
Furthermore, each element in the list may be accessed like Model
.
See Icons output handling for a code example of accessing this model’s data.
Warning
Some requests return slightly different values. For example, some collection icons have a attribution_preview_url, while some do not.
Note
If generated with get_icons_by_term()
, the json structure also contains a collections list.
Note
If generated with get_recent_icons()
, the json structure lacks the tags list.
Usage¶
UsageModel
will return an instance with the following json structure:
{
"limits": {
"daily": null,
"hourly": null,
"monthly": 5000
},
"usage": {
"daily": 30,
"hourly": 16,
"monthly": 32
}
}
How this data may be accessed after a request is described in Model
.
Beyond this data, UsageModel
instances also have the following attributes:
generated_at holding a string indicating when the request was generated.
response holding a requests.Response object of the request.
See Usage output handling for a code example of accessing this model’s data.
Enterprise¶
EnterpriseModel
will return an instance with the following json structure:
{
"licenses_consumed": 3,
"result": "success"
}
How this data may be accessed after a request is described in Model
.
Beyond this data EnterpriseModel
instances also has the following attribute:
response holding a requests.Response object of the request.