addSignature: Internal functions that need to be exported

Description Usage Arguments Author(s) References See Also

Description

These are really internal functions for the Rflickr package that need to be exported so that they are visible/accessible by functions in the list FlickrFunctions. These functions are used by the FlickrSession objects but are not in the Rflickr name space. Since the use these internal functions, the internal functions must be exported. We could modify the function definitions to use Rflickr:::addSignature, etc. or modify the environments of the functions. But this is more of an example at present than a highly engineered piece of software. Exporting these functions is not really a big deal and it is useful for people to see them if they want to understand what is happening.

addSignature is repsonsible for creating the api_sig parameter for the form submission. It creates an md5 encryption of the other form parameters.

processFlickrResponse parses the body of the HTTP response from the Flickr operation and throws an error if an error occurred or parses the XML content.

Usage

1
2
3
4
addSignature(secret, ..., .args = list(...), removeMethod = FALSE)
processFlickrResponse(txt, method = character(), api_key = character(),
                       secret = character(), .convert = NULL,
                        format = character()) 

Arguments

...

the name = value pairs for the form submission

.args

a way to avoid using the ... parameter and specify and existing list.

removeMethod

ignored!

txt

the body of the HTTP response

method

the name of the Flickr operation being called when the error occurred.

api_key

the api_key obtained when registering the application with Flickr.

secret

the secret associated with the api_key

.convert

a function or missing value NA. If this is a function, it is called with the XMLDocument generated from parsing the result of the HTTP response from the operation invocation. If this is NA, the text of the HTTP response is returned, not the XML tree.

format

an empty character vector or the string "json" indicating the format of the HTTP response.

Author(s)

Duncan Temple Lang

References

http://www.flickr.com/services/api

See Also

authenticate flickrSession All of the flickr.* functions.


duncantl/Rflickr documentation built on May 15, 2019, 5:54 p.m.