You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working with an API that does not provide ids/slugs for resource identifiers, as it expects you to use the url.
It's difficult to use Slumber to fetch a given resource outright (e.g. from a saved setting), such as 'http://example.com/api/resources/example-resource'.
I'm making extensive use of Slumber in my project, so I'd like to continue using it's 'api' object, rather than constructing requests manually.
If I create a new API object using the resource's url as the base url (not particularly desirable anyway), then I run in to the issue described in #28:
api=slumber.API('http://example.com/api/resources/example-resource/')
api.get() # Just returns a slumber resource, and does not make the request
Is fetching a particular resource by it's absolute url a common pattern/requirement for others, and is this something that could be added to Slumber? I'm not sure what the desirable slumber-api would be, but if there is a good suggestion I could make a pull request.
The text was updated successfully, but these errors were encountered:
I've just discovered that using url_override is also a workaround - I'll use this method for the time-being, but there are comments for this kwarg that warn it's a bit of a hack.
I'm working with an API that does not provide ids/slugs for resource identifiers, as it expects you to use the url.
It's difficult to use Slumber to fetch a given resource outright (e.g. from a saved setting), such as
'http://example.com/api/resources/example-resource'
.I'm making extensive use of Slumber in my project, so I'd like to continue using it's 'api' object, rather than constructing requests manually.
If I create a new API object using the resource's url as the base url (not particularly desirable anyway), then I run in to the issue described in #28:
I've resorted to the following pattern for now:
Is fetching a particular resource by it's absolute url a common pattern/requirement for others, and is this something that could be added to Slumber? I'm not sure what the desirable slumber-api would be, but if there is a good suggestion I could make a pull request.
The text was updated successfully, but these errors were encountered: