• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

build/H18-Aug-2014-23,84419,602

docs/H03-May-2022-10,3297,031

examples/H03-May-2022-895660

getopt/H03-May-2022-795621

libmtwist/H03-May-2022-1,331891

src/H03-May-2022-33,13820,136

utils/H03-May-2022-9,2267,182

AUTHORSH A D04-Jun-200996 32

COPYINGH A D26-Mar-201117.6 KiB340281

COPYING.LIBH A D26-Mar-201125.9 KiB

ChangeLogH A D18-Aug-2014168.4 KiB5,5973,717

INSTALLH A D18-Jun-201315.4 KiB371288

Makefile.amH A D15-Jan-20141.6 KiB6833

Makefile.inH A D03-May-202230.9 KiB957837

NEWSH A D17-Aug-201481 KiB2,0121,508

NOTICEH A D04-Jun-2009122 32

READMEH A D26-Jan-201420.7 KiB438393

aclocal.m4H A D14-Jan-201446.4 KiB1,3311,197

autogen.shH A D24-Feb-201410.3 KiB433293

configureH A D14-Jan-2014472.8 KiB16,45513,727

configure.acH A D14-Jan-201413.5 KiB480396

flickcurl-config.inH A D18-Jun-20131.6 KiB9269

flickcurl.conf.exampleH A D04-Jun-2009566 1614

flickcurl.pc.inH A D04-Jun-2009257 1411

flickcurl.rdf.inH A D02-Jan-20101.9 KiB6946

flickcurl.specH A D18-Aug-20143.1 KiB10881

flickcurl.spec.inH A D04-Jun-20093.1 KiB10882

gtk-doc.makeH A D18-Jun-20138.4 KiB281241

README

1                    Flickcurl: C library for the Flickr API
2
3Dave Beckett
4
5   Flickcurl is a C library for the Flickr API, handling creating the
6   requests, signing, token management, calling the API, marshalling
7   request parameters and decoding responses. It uses libcurl to call the
8   REST web service and libxml2 to manipulate the XML responses. Flickcurl
9   supports all of the API (see Flickcurl API coverage for details)
10   including the functions for photo/video uploading, browsing, searching,
11   adding and editing comments, groups, notes, photosets, categories,
12   activity, blogs, favorites, places, tags, machine tags, institutions,
13   pandas and photo/video metadata. It also includes a program flickrdf to
14   turn photo metadata, tags, machine tags and places into an RDF triples
15   description.
16
17   License: LGPL 2.1+ / GPL 2+ / Apache 2.0+
18
19   Download: http://download.dajobe.org/flickcurl/
20
21   Docs: Flickcurl API reference manual
22
23   News: Flickcurl News including changes
24
25   Requirements: the following libraries are needed:
26     * libcurl 7.10.0 or newer
27     * libxml2 2.6.8 or newer
28     * raptor 2.0.0 (optional)
29
30   Then do the usual ./configure, make and make install sequence to
31   install the library and the flickcurl and flickrdf utilities.
32
33   GitHub hosts the sources for Flickcurl at the GitHub flickcurl project
34   page.
35
36   Checkout with:
37  git clone git://github.com/dajobe/flickcurl.git
38
39  # Get the libmtwist submodule and fetch its content with:
40
41  git submodule update --init
42
43Flickr API Configuration
44
45   The library needs to know your Flickr API OAuth token, token secret,
46   client key and client secret, suitable for calling some of the API
47   calls. To obtain these, you need to apply for API keys at the Flickr
48   Services site. When using the utility programs, this information should
49   be stored in the ~/.flickcurl.conf file so that it can be read at
50   run-time. The configuration file has the format:
51[flickr]
52oauth_token=12345678901234567-abcdef0123456789
53oauth_token_secret=abcdef9876543210
54oauth_client_key=0123456789abcdef0123456789abcdef
55oauth_client_secret=fedcba9876543210
56
57   See Authenticating Flickcurl for OAuth in the manual for full details
58   of how to build flickcurl, authenticate and set up the configuration
59   file above.
60
61Utility programs
62
63  flickcurl - call Flickr API
64
65   This can call some of the Flickr APIs plus help with OAuth
66   authentication steps to get the final set of tokens and secrets and
67   writing them into ~/.flickcurl.conf file. Use flickcurl -h to get a
68   list of the supported commands and their arguments.
69
70   This example calls the photos.getInfo API via the photos-getInfo
71   command on photo 196308964 which decodes the returned XML into fields
72   in a flickcurl_photo structure which are then printed with their
73   datatype, string value and integer value (or -1 if it has none). All
74   dateTime values are converted into both the ISO format string (such as
75   used by Web and XML standards) and unix time integers. Photo tags are
76   also returned when present along with their id, author, raw, cooked and
77   machine tag status.
78$ flickcurl photos.getInfo 196308964
79flickcurl: photo with URI http://www.flickr.com/photos/dajobe/196308964/ ID 1963
8008964 and 5 tags
81    field dateuploaded (1) with dateTime value: '2006-07-23T18:16:13Z' / 1153678
82573
83    field farm (2) with integer value: '1' / 1
84    field isfavorite (3) with boolean value: '0' / 0
85    field license (4) with integer value: '1' / 1
86    field originalformat (5) with string value: 'jpg' / -1
87    field rotation (6) with integer value: '0' / 0
88    field server (7) with integer value: '57' / 57
89    field dates_lastupdate (8) with dateTime value: '2007-02-25T07:45:46Z' / 117
902389546
91    field dates_posted (9) with dateTime value: '2006-07-23T18:16:13Z' / 1153678
92573
93    field dates_taken (10) with string value: '2006-07-22 22:28:50' / -1
94    field dates_takengranularity (11) with integer value: '0' / 0
95    field editability_canaddmeta (13) with boolean value: '1' / 1
96    field editability_cancomment (14) with boolean value: '1' / 1
97    field geoperms_iscontact (15) with boolean value: '0' / 0
98    field geoperms_isfamily (16) with boolean value: '0' / 0
99    field geoperms_isfriend (17) with boolean value: '0' / 0
100    field geoperms_ispublic (18) with boolean value: '1' / 1
101    field location_accuracy (19) with integer value: '12' / 12
102    field location_latitude (20) with float value: '36.620487' / -1
103    field location_longitude (21) with float value: '-121.904468' / -1
104    field owner_location (22) with string value: 'Mountain View, California, USA
105' / -1
106    field owner_nsid (23) with string value: '13355580@N00' / -1
107    field owner_realname (24) with string value: 'Dave Beckett' / -1
108    field owner_username (25) with string value: 'dajobe' / -1
109    field title (26) with string value: 'Jellyfish at Monterey Aquarium' / -1
110    field visibility_isfamily (27) with boolean value: '0' / 0
111    field visibility_isfriend (28) with boolean value: '0' / 0
112    field visibility_ispublic (29) with boolean value: '1' / 1
113    field secret (30) with string value: 'b34cb0af68' / -1
114    field originalsecret (31) with string value: 'b34cb0af68' / -1
115    field location_locality (33) with string value: 'Pacific Grove' / -1
116    field location_region (35) with string value: 'California' / -1
117    field location_country (36) with string value: 'United States' / -1
118    field location_placeid (37) with string value: 'J1HdelRTVrx7R.g2' / -1
119    field locality_placeid (39) with string value: 'J1HdelRTVrx7R.g2' / -1
120    field county_placeid (40) with string value: 'fpIAzjpQUL9F5MEpDw' / -1
121    field region_placeid (41) with string value: 'NsbUWfBTUb4mbyVu' / -1
122    field country_placeid (42) with string value: 'nz.gsghTUb4c2WAecA' / -1
123    field location_woeid (43) with string value: '2467327' / -1
124    field locality_woeid (45) with string value: '2467327' / -1
125    field county_woeid (46) with string value: '12587696' / -1
126    field region_woeid (47) with string value: '2347563' / -1
127    field country_woeid (48) with string value: '23424977' / -1
128    field usage_candownload (49) with boolean value: '1' / 1
129    field usage_canblog (50) with boolean value: '1' / 1
130    field usage_canprint (51) with boolean value: '1' / 1
131    field views (56) with integer value: '529' / 529
132tags:
1330) regular tag: id 94493-196308964-3362 author ID 13355580@N00 name (Unknown) ra
134w 'jellyfish' cooked 'jellyfish' count 0
1351) regular tag: id 94493-196308964-119180 author ID 13355580@N00 name (Unknown)
136raw 'montereyaquarium' cooked 'montereyaquarium' count 0
1372) regular tag: id 94493-196308964-2443 author ID 13355580@N00 name (Unknown) ra
138w 'monterey' cooked 'monterey' count 0
1393) machine tag: id 94493-196308964-8499312 author ID 13355580@N00 name (Unknown)
140 raw 'xmlns:dc=http://purl.org/dc/elements/1.1/' cooked 'xmlns:dc=httppurlorgdce
141lements11' count 0
1424) machine tag: id 94493-196308964-8499315 author ID 13355580@N00 name (Unknown)
143 raw 'dc:subject=jellyfish' cooked 'dc:subject=jellyfish' count 0
144notes:
145  Location: latitude 36.620487  longitude -121.904468  accuracy unknown
146  0) place location: name '
147                ' id J1HdelRTVrx7R.g2 woeid 2467327
148  2) place locality: name 'Pacific Grove' id J1HdelRTVrx7R.g2 woeid 2467327
149  3) place county: name 'Monterey' id fpIAzjpQUL9F5MEpDw woeid 12587696
150  4) place region: name 'California' id NsbUWfBTUb4mbyVu woeid 2347563
151  5) place country: name 'United States' id nz.gsghTUb4c2WAecA woeid 23424977
152
153  flickrdf - generate RDF triples from a Flickr photo
154
155   This utility uses the photos.getInfo API to interpret the description
156   fields, tags and places for a photo URI into RDF triples. If raptor is
157   present, it will be used to provide proper serializing to RDF rather
158   than the built in and hacky ntriples/turtle output.
159
160   Machine tags when they are found are scanned for xmlns:prefix=uri and
161   then all other machine tags with that prefix turn into triples. Several
162   prefixes are also pre-defined by the library to automatically get
163   turned into triples without an xmlns, such as blue:, cell:, filter: and
164   geo:. Non-machine tags are not yet interpreted.
165
166   Places attached to photos are turned into extra information blocks
167   (sets of triples) hung off a places:place predicate.
168<http://www.flickr.com/photos/dajobe/196308964/> <http://purl.org/dc/terms/creat
169or> _:person .
170_:person <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foa
171f/0.1/#Person> .
172_:person <http://xmlns.com/foaf/0.1/#maker> <http://www.flickr.com/photos/dajobe
173/196308964/> .
174<http://www.flickr.com/photos/dajobe/196308964/> <http://purl.org/dc/terms/dateS
175ubmitted> "2006-07-23T18:16:13Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
176<http://www.flickr.com/photos/dajobe/196308964/> <http://purl.org/dc/terms/right
177s> <http://creativecommons.org/licenses/by-nc-sa/2.0/> .
178<http://www.flickr.com/photos/dajobe/196308964/> <http://purl.org/dc/terms/modif
179ied> "2007-02-25T07:45:46Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
180<http://www.flickr.com/photos/dajobe/196308964/> <http://purl.org/dc/terms/issue
181d> "2006-07-23T18:16:13Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
182<http://www.flickr.com/photos/dajobe/196308964/> <http://purl.org/dc/terms/creat
183ed> "2006-07-22T22:28:50Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
184<http://www.flickr.com/photos/dajobe/196308964/> <http://www.w3.org/2003/01/geo/
185wgs84_pos#lat> "36.620487"^^<http://www.w3.org/2001/XMLSchema#double> .
186<http://www.flickr.com/photos/dajobe/196308964/> <http://www.w3.org/2003/01/geo/
187wgs84_pos#long> "-121.904468"^^<http://www.w3.org/2001/XMLSchema#double> .
188_:person <http://xmlns.com/foaf/0.1/#name> "Dave Beckett" .
189_:person <http://xmlns.com/foaf/0.1/#nick> "dajobe" .
190<http://www.flickr.com/photos/dajobe/196308964/> <http://purl.org/dc/terms/title
191> "Jellyfish at Monterey Aquarium" .
192<http://www.flickr.com/photos/dajobe/196308964/> <http://purl.org/dc/elements/1.
1931/subject> "jellyfish" .
194<http://www.flickr.com/photos/dajobe/196308964/> <http://machinetags.org/ns/Plac
195es#place> _:place0 .
196_:place0 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://machinetags.o
197rg/ns/Places#Place> .
198_:place0 <http://machinetags.org/ns/Places#type> "location" .
199_:place0 <http://machinetags.org/ns/Places#id> "WM3JEXSbBZqqRtGA" .
200_:place0 <http://machinetags.org/ns/Places#placeid> "2467327" .
201<http://www.flickr.com/photos/dajobe/196308964/> <http://machinetags.org/ns/Plac
202es#place> _:place2 .
203_:place2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://machinetags.o
204rg/ns/Places#Place> .
205_:place2 <http://machinetags.org/ns/Places#type> "locality" .
206_:place2 <http://machinetags.org/ns/Places#name> "Pacific Grove" .
207_:place2 <http://machinetags.org/ns/Places#id> "WM3JEXSbBZqqRtGA" .
208_:place2 <http://machinetags.org/ns/Places#placeid> "2467327" .
209<http://www.flickr.com/photos/dajobe/196308964/> <http://machinetags.org/ns/Plac
210es#place> _:place3 .
211_:place3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://machinetags.o
212rg/ns/Places#Place> .
213_:place3 <http://machinetags.org/ns/Places#type> "county" .
214_:place3 <http://machinetags.org/ns/Places#name> "Monterey" .
215_:place3 <http://machinetags.org/ns/Places#id> "AQ4UpRqYA5l0BiyF.A" .
216_:place3 <http://machinetags.org/ns/Places#placeid> "12587696" .
217<http://www.flickr.com/photos/dajobe/196308964/> <http://machinetags.org/ns/Plac
218es#place> _:place4 .
219_:place4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://machinetags.o
220rg/ns/Places#Place> .
221_:place4 <http://machinetags.org/ns/Places#type> "region" .
222_:place4 <http://machinetags.org/ns/Places#name> "California" .
223_:place4 <http://machinetags.org/ns/Places#id> "SVrAMtCbAphCLAtP" .
224_:place4 <http://machinetags.org/ns/Places#placeid> "2347563" .
225<http://www.flickr.com/photos/dajobe/196308964/> <http://machinetags.org/ns/Plac
226es#place> _:place5 .
227_:place5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://machinetags.o
228rg/ns/Places#Place> .
229_:place5 <http://machinetags.org/ns/Places#type> "country" .
230_:place5 <http://machinetags.org/ns/Places#name> "United States" .
231_:place5 <http://machinetags.org/ns/Places#id> "4KO02SibApitvSBieQ" .
232_:place5 <http://machinetags.org/ns/Places#placeid> "23424977" .
233<http://www.flickr.com/photos/dajobe/196308964/> <http://machinetags.org/ns/Flic
234kr#photo> <http://farm1.static.flickr.com/57/196308964_b34cb0af68_s.jpg> .
235<http://farm1.static.flickr.com/57/196308964_b34cb0af68_s.jpg> <http://www.w3.or
236g/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/#Image> .
237<http://farm1.static.flickr.com/57/196308964_b34cb0af68_s.jpg> <http://www.w3.or
238g/2000/01/rdf-schema#label> "Square" .
239<http://farm1.static.flickr.com/57/196308964_b34cb0af68_s.jpg> <http://machineta
240gs.org/ns/Flickr#width> "75"^^<http://www.w3.org/2001/XMLSchema#integer> .
241<http://farm1.static.flickr.com/57/196308964_b34cb0af68_s.jpg> <http://machineta
242gs.org/ns/Flickr#height> "75"^^<http://www.w3.org/2001/XMLSchema#integer> .
243<http://www.flickr.com/photos/dajobe/196308964/> <http://machinetags.org/ns/Flic
244kr#photo> <http://farm1.static.flickr.com/57/196308964_b34cb0af68_t.jpg> .
245<http://farm1.static.flickr.com/57/196308964_b34cb0af68_t.jpg> <http://www.w3.or
246g/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/#Image> .
247<http://farm1.static.flickr.com/57/196308964_b34cb0af68_t.jpg> <http://www.w3.or
248g/2000/01/rdf-schema#label> "Thumbnail" .
249<http://farm1.static.flickr.com/57/196308964_b34cb0af68_t.jpg> <http://machineta
250gs.org/ns/Flickr#width> "75"^^<http://www.w3.org/2001/XMLSchema#integer> .
251<http://farm1.static.flickr.com/57/196308964_b34cb0af68_t.jpg> <http://machineta
252gs.org/ns/Flickr#height> "100"^^<http://www.w3.org/2001/XMLSchema#integer> .
253<http://www.flickr.com/photos/dajobe/196308964/> <http://machinetags.org/ns/Flic
254kr#photo> <http://farm1.static.flickr.com/57/196308964_b34cb0af68_m.jpg> .
255<http://farm1.static.flickr.com/57/196308964_b34cb0af68_m.jpg> <http://www.w3.or
256g/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/#Image> .
257<http://farm1.static.flickr.com/57/196308964_b34cb0af68_m.jpg> <http://www.w3.or
258g/2000/01/rdf-schema#label> "Small" .
259<http://farm1.static.flickr.com/57/196308964_b34cb0af68_m.jpg> <http://machineta
260gs.org/ns/Flickr#width> "180"^^<http://www.w3.org/2001/XMLSchema#integer> .
261<http://farm1.static.flickr.com/57/196308964_b34cb0af68_m.jpg> <http://machineta
262gs.org/ns/Flickr#height> "240"^^<http://www.w3.org/2001/XMLSchema#integer> .
263<http://www.flickr.com/photos/dajobe/196308964/> <http://machinetags.org/ns/Flic
264kr#photo> <http://farm1.static.flickr.com/57/196308964_b34cb0af68.jpg> .
265<http://farm1.static.flickr.com/57/196308964_b34cb0af68.jpg> <http://www.w3.org/
2661999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/#Image> .
267<http://farm1.static.flickr.com/57/196308964_b34cb0af68.jpg> <http://www.w3.org/
2682000/01/rdf-schema#label> "Medium" .
269<http://farm1.static.flickr.com/57/196308964_b34cb0af68.jpg> <http://machinetags
270.org/ns/Flickr#width> "375"^^<http://www.w3.org/2001/XMLSchema#integer> .
271<http://farm1.static.flickr.com/57/196308964_b34cb0af68.jpg> <http://machinetags
272.org/ns/Flickr#height> "500"^^<http://www.w3.org/2001/XMLSchema#integer> .
273<http://www.flickr.com/photos/dajobe/196308964/> <http://machinetags.org/ns/Flic
274kr#photo> <http://farm1.static.flickr.com/57/196308964_b34cb0af68_o.jpg> .
275<http://farm1.static.flickr.com/57/196308964_b34cb0af68_o.jpg> <http://www.w3.or
276g/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/#Image> .
277<http://farm1.static.flickr.com/57/196308964_b34cb0af68_o.jpg> <http://www.w3.or
278g/2000/01/rdf-schema#label> "Original" .
279<http://farm1.static.flickr.com/57/196308964_b34cb0af68_o.jpg> <http://machineta
280gs.org/ns/Flickr#width> "600"^^<http://www.w3.org/2001/XMLSchema#integer> .
281<http://farm1.static.flickr.com/57/196308964_b34cb0af68_o.jpg> <http://machineta
282gs.org/ns/Flickr#height> "800"^^<http://www.w3.org/2001/XMLSchema#integer> .
283
284   If you have raptor installed, you can get nicer RDF triples out and
285   with rapper 1.4.14+, pretty-printed turtle:
286@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
287@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
288@prefix dc: <http://purl.org/dc/elements/1.1/> .
289@prefix foaf: <http://xmlns.com/foaf/0.1/#> .
290@prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> .
291@prefix dcterms: <http://purl.org/dc/terms/> .
292@prefix places: <http://machinetags.org/ns/Places#> .
293@prefix flickr: <http://machinetags.org/ns/Flickr#> .
294@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
295
296<http://www.flickr.com/photos/dajobe/196308964/>
297    flickr:photo <http://farm1.static.flickr.com/57/196308964_b34cb0af68.jpg>, <
298http://farm1.static.flickr.com/57/196308964_b34cb0af68_m.jpg>, <http://farm1.sta
299tic.flickr.com/57/196308964_b34cb0af68_o.jpg>, <http://farm1.static.flickr.com/5
3007/196308964_b34cb0af68_s.jpg>, <http://farm1.static.flickr.com/57/196308964_b34c
301b0af68_t.jpg> ;
302    places:place [
303        places:id "WM3JEXSbBZqqRtGA" ;
304        places:placeid "2467327" ;
305        places:type "location" ;
306        a places:Place
307    ], [
308        places:id "WM3JEXSbBZqqRtGA" ;
309        places:name "Pacific Grove" ;
310        places:placeid "2467327" ;
311        places:type "locality" ;
312        a places:Place
313    ], [
314        places:id "AQ4UpRqYA5l0BiyF.A" ;
315        places:name "Monterey" ;
316        places:placeid "12587696" ;
317        places:type "county" ;
318        a places:Place
319    ], [
320        places:id "SVrAMtCbAphCLAtP" ;
321        places:name "California" ;
322        places:placeid "2347563" ;
323        places:type "region" ;
324        a places:Place
325    ], [
326        places:id "4KO02SibApitvSBieQ" ;
327        places:name "United States" ;
328        places:placeid "23424977" ;
329        places:type "country" ;
330        a places:Place
331    ] ;
332    dc:subject "jellyfish" ;
333    dcterms:created "2006-07-22T22:28:50Z"^^xsd:dateTime ;
334    dcterms:creator [
335        a foaf:Person ;
336        foaf:maker <http://www.flickr.com/photos/dajobe/196308964/> ;
337        foaf:name "Dave Beckett" ;
338        foaf:nick "dajobe"
339    ] ;
340    dcterms:dateSubmitted "2006-07-23T18:16:13Z"^^xsd:dateTime ;
341    dcterms:issued "2006-07-23T18:16:13Z"^^xsd:dateTime ;
342    dcterms:modified "2007-02-25T07:45:46Z"^^xsd:dateTime ;
343    dcterms:rights <http://creativecommons.org/licenses/by-nc-sa/2.0/> ;
344    dcterms:title "Jellyfish at Monterey Aquarium" ;
345    geo:lat 36.620487 ;
346    geo:long -121.904468 .
347
348<http://farm1.static.flickr.com/57/196308964_b34cb0af68_s.jpg>
349    flickr:height 75 ;
350    flickr:width 75 ;
351    a foaf:Image ;
352    rdfs:label "Square" .
353
354<http://farm1.static.flickr.com/57/196308964_b34cb0af68_t.jpg>
355    flickr:height 100 ;
356    flickr:width 75 ;
357    a foaf:Image ;
358    rdfs:label "Thumbnail" .
359
360<http://farm1.static.flickr.com/57/196308964_b34cb0af68_m.jpg>
361    flickr:height 240 ;
362    flickr:width 180 ;
363    a foaf:Image ;
364    rdfs:label "Small" .
365
366<http://farm1.static.flickr.com/57/196308964_b34cb0af68.jpg>
367    flickr:height 500 ;
368    flickr:width 375 ;
369    a foaf:Image ;
370    rdfs:label "Medium" .
371
372<http://farm1.static.flickr.com/57/196308964_b34cb0af68_o.jpg>
373    flickr:height 800 ;
374    flickr:width 600 ;
375    a foaf:Image ;
376    rdfs:label "Original" .
377
378Library use example
379
380   See examples/print-photo-info.c
381#include <stdio.h>
382#include <flickcurl.h>
383
384int main(int argc, char *argv[]);
385
386int main(int argc, char *argv[]) {
387  flickcurl *fc;
388  flickcurl_photo *photo;
389  flickcurl_photo_field_type field_type;
390  int i;
391
392  flickcurl_init(); /* optional static initialising of resources */
393  fc = flickcurl_new();
394
395  /* Set configuration, or more likely read from a config file */
396  flickcurl_set_oauth_client_key(fc, "...");
397  flickcurl_set_oauth_client_secret(fc, "...");
398  flickcurl_set_oauth_token(fc, "...");
399  flickcurl_set_oauth_token_secret(fc, "...");
400
401  photo = flickcurl_photos_getInfo(fc, "123456789"); /* photo ID */
402
403  for(field_type = 0; field_type <= PHOTO_FIELD_LAST; field_type++) {
404    flickcurl_field_value_type datatype = photo->fields[field_type].type;
405
406    if(datatype != VALUE_TYPE_NONE)
407      fprintf(stderr, "field %s (%d) with %s value: '%s' / %d\n",
408              flickcurl_get_photo_field_label(field_type), (int)field_type,
409              flickcurl_get_field_value_type_label(datatype),
410              photo->fields[field_type].string,
411              photo->fields[field_type].integer);
412  }
413
414  for(i = 0; i < photo->tags_count; i++) {
415    flickcurl_tag* tag=photo->tags[i];
416    fprintf(stderr,
417            "%d) %s tag: id %s author ID %s name %s raw '%s' cooked '%s' count %
418d\n",
419            i, (tag->machine_tag ? "machine" : "regular"),
420            tag->id, tag->author,
421            (tag->authorname ? tag->authorname : "(Unknown)"),
422            tag->raw, tag->cooked,
423            tag->count);
424  }
425
426  flickcurl_free_photo(photo);
427  flickcurl_free(fc);
428  flickcurl_finish(); /* optional static free of resources */
429
430  return 0;
431}
432
433   For more extensive example code, see the source of the flickcurl
434   utility in flickcurl.c which has code that calls all the API functions.
435     __________________________________________________________________
436
437   Copyright (C) 2007-2014 Dave Beckett
438