Description Running tests Design principles Package options Author(s) References See Also
The endpoint descriptions are retrieved from Shutterstock API Reference documentation.
Insert unit tests by using testthat
package
Copy .httr-oauth
file into tests/testthat
directory (but
remove that later)
Add/uncomment httptest::start_capturing()
and
httptest::stop_capturing()
recording lines between the tests
Run specific tests one by one e.g. devtools::test(filter = "audio")
When the API files are created/updated, remove/comment the recording lines
Wrap tests with with_mock_api
calls
Run the tests again with the same filter
Done if all tests pass. Move to the next one.
To make the package dev structure loose coupled, the name of the
parameters passed to a call are not hard-coded in the code. The parameters
are handled by the HTTP requests which receive the parameters from function
calls by the ellipsis (...
).
For the calls containing that kind of parameters are validated by e.g.
check_required_args(id, "numeric")
. It is considered as required
especially if that parameter is tied to a URL.
sstk.api.root.url
The base URL for retrieving the API
endpoints. Default: https://api.shutterstock.com/
Maintainer: Metin Yazici stradivariusboul@gmail.com
Shutterstock API Reference: https://api-reference.shutterstock.com/
Useful links:
Report bugs at https://github.com/strboul/shutterstock-r/issues
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.