1 2====================== 3Flickr::API Subclasses 4====================== 5 6The Flickr::API has a number of derived subclasses to aid in the 7use of the various sections of Flickr's API as described on 8https://www.flickr.com/services/api/ 9 10 11A NOTE ON TESTING 12 13These subclasses rely on an existing OAuth configuration as is used by 14earlier tests. When you test them, you will need to have done the `make test' 15with MAKETEST_OAUTH_CFG=config_file specified. 16 17 18A NOTE ON AUTHENTICATION 19 20Flickr::API subclasses don't use Flickr's original (deprecated) 21authentication. You will need to use OAuth. On the other hand, 22some methods don't require authentication, just changing key to 23consumer_key and secret to consumer_secret should work on these. 24 25 26The Flickr::API is derived from LWP::UserAgent. It adds three main 27keys to the LWP::UserAgent: $self->{flickr}, $self->{oauth} and 28$self->{fauth}. The oauth key contains the key/value pairs needed 29to handle Flickr's OAuth authentication. An OAuth section will look 30something like: 31 32 'oauth' => { 33 'token' => '12345678909876543-b77c2eface79e3d3', 34 'signature_method' => 'HMAC-SHA1', 35 'request_method' => 'GET', 36 'consumer_key' => '123beeffaceade94a0a3611ca1f5a5e0', 37 'access_token' => bless( { 38 'token_secret' => 'beefcafe349be12d', 39 'token' => '12345678909876543-b77c2eface79e3d3', 40 'extra_params' => { 41 'fullname' => 'ASCII, Character', 42 'user_nsid' => '1234567890@N00', 43 'username' => 'abcdefg' 44 }, 45 'from_hash' => 1 46 }, 'Net::OAuth::AccessTokenResponse' ), 47 'consumer_secret' => '64beefca1f7eecad', 48 'request_url' => 'https://api.flickr.com/services/rest/', 49 'callback' => 'https://127.0.0.1', 50 'nonce' => '3c0f553fa1eba3b1c62cfabf2ee9afaa', 51 'timestamp' => 1438806177, 52 'version' => '1.0', 53 'token_secret' => 'beefcafe349be12d' 54 } 55 56The fauth key contains the key/value pairs needed to handle Flickr's 57(original but deprecated) authentication. An FAuth section will look 58something like: 59 60 'fauth' => { 61 'frob' => '34567890987654321-78faced1b7e8eda3-1234542', 62 'token' => '12345678909876543-42b0ceded01f65f5', 63 'secret' => '64beefca1f7eecad', 64 'key' => '123beeffaceade94a0a3611ca1f5a5e0' 65 }, 66 67The flickr key contains everything else Flickr. This is where values 68used by the various classes derived from Flickr::API will be stored. 69 70 71 'flickr' => { 72 'status' => { 73 '_rc' => 0, 74 'error_code' => 0, 75 'success' => 1, 76 'error_message' => '' 77 } 78 }, 79 80 81In addition, and to help maintain continuity with earlier versions, 82the following individual keys are used in the Flickr::API 83 84 85 'api_key' => '123beeffaceade94a0a3611ca1f5a5e0' 86 'api_secret' => '64beefca1f7eecad', 87 'unicode' => 0, 88 'rest_uri' => 'https://api.flickr.com/services/rest/', 89 'auth_uri' => 'https://api.flickr.com/services/auth/', 90 'api_type' => 'oauth', 91 92 93 94 95Flickr::API::Cameras 96==================== 97 98Flickr::API::Cameras is a subclass of Flickr::API with some additions 99for using Flickr's flickr.cameras methods: 100 101brands_list - returns a list of camera brands as an array 102brands_hash - returns a list of camera brands as a hashref 103 104get_cameras - returns a hashref of camera models by the specified 105 brand as a hashref 106 107 108 109Flickr::API::Reflection 110======================= 111 112 113Flickr::API::Reflection is a subclass of Flickr::API with some (hopefully) 114useful additions for using Flickr's flickr.reflection methods. 115 116 117methods_list - returns a list of Flickr's methods as an array 118methods_hash - returns a list of Flickr's methods as a hashref 119 120get_method - returns the description of a specified method as a 121 hashref 122 123 124 125 126COPYRIGHT AND LICENSE 127 128Copyright (C) 2015 Louis B. Moore <lbmoore@cpan.org> 129License: Perl Artistic License 2.0 130