2013-09-01 Flickcurl Version 1.25 Released
More OAuth fixes including getting uploading fully working.
Multiple internal OAuth changes to simplify code.
Updated the coverage for API calls added in the last year
approximately.
Added new API call to get the most frequently used tags for a user.
This does not seem to work over OAuth:
flickcurl_tag** flickcurl_tags_getMostFrequentlyUsed(flickcurl* fc);
Added new API call to get the groups of a user:
flickcurl_group** flickcurl_people_getGroups(flickcurl* fc,
const char* user_id, const char* extras);
Added new API call to get contacts tagging suggestions but reordered
the parameters to match the rest of the contacts.get* API calls.
flickcurl_contact** flickcurl_contacts_getTaggingSuggestions(flickcurl* fc,
const char* include_self, const char* include_address_book,
int page, int per_page);
Added new API calls flickcurl_groups_join(),
flickcurl_groups_joinRequest() and flickcurl_groups_leave() for (some
of) the new group API:
int flickcurl_groups_join(flickcurl* fc, const char* group_id,
const char* accept_rules);
int flickcurl_groups_joinRequest(flickcurl* fc, const char* group_id,
const char* message, const char* accept_rules);
int flickcurl_groups_leave(flickcurl* fc, const char* group_id,
const char* delete_photos);
Updated the example code flickrdf.c to use the non-deprecated
flickcurl_photos_getInfo2()
Updated deprecated flickcurl-config(1) program to be independent of
pkg-config. This allows make distcheck to work.
2013-04-10 Flickcurl Version 1.24 Released
Fixed uploading with OAuth - incorrect signature since it failed to use
POST.
Added flickcurl_photos_getInfo2() deprecating
flickcurl_photos_getInfo() adding the optional 'secret' parameter that
was added sometime to the API. See [2]Debian bug 637746.
Updated flickcurl(1) to allow photos.getInfo to take an optional SECRET
arg using the new call below, and to add the missing command
contacts.getPublicList which fixes [3]Issue 19. .
Added new APIs calls to make available the Flickr username and NSID
when OAuth authentication is done.
const char* flickcurl_get_oauth_username(flickcurl* fc);
const char* flickcurl_get_oauth_user_nsid(flickcurl* fc);
These new calls were from GitHub [4]pull request 18 from Jose Carlos
Garcia Sogo - thanks.
Added a pile of fields to flickcurl_group to match what the API returns
rather than what the documentation says:
* iconfarm icon farm number
* is_moderator and is_member booleans
* rules descriptive text
* pool_count and topic_count counts
* group restriction booleans: photos_ok, videos_ok, images_ok,
screens_ok, art_ok, safe_ok, moderate_ok, restricted_ok, has_geo.
Fixed grabbing text from a <tag> child text node correctly Fixes
[5]Issue 16.
p>
Fixed parsing of latitude and longitude value responses.
Fixed a few flickcurl(1) utility manual page wordings. See [6]Debian
bug 635989 and [7]Debian bug 635989.
Updated example code to use OAuth authentication API.
Fixed a few memory mis-uses via clang and GCC 4.8.
2012-09-01 Flickcurl Version 1.23 Released
This release fully supports using Flickr via OAuth 1.0 and converting
from the legacy Flickr authentication to OAuth. It supports both
authentication flows but Flickr has deprecated the legacy
authentication, so it might stop working at any time.
Flickr [2]Legacy authentication flow with Flickcurl:
1. The initial configuration needed is the API Key and Shared Secret,
obtained from the [3]Flickr App Garden.
2. Get the Authentication URL from the Flickr App Garden.
3. Show the Authentication URL to the user who approves the app
resulting in a user visible Frob.
4. Authentication completes using flickcurl_auth_getFullToken() which
exchanges the Frob for the final Auth Token.
5. Optionally, the flickcurl(1) utility will store in the
configuration file: auth_token, api_key and secret. Otherwise the
application should do this.
Flickr [4]Flickr OAuth 1.0 flow with Flickcurl:
1. The initial configuration needed is the Client Key (API Key) and
Client Secret (Shared Secret), obtained from the [5]Flickr App
Garden.
2. Authentication starts with a call to
flickcurl_oauth_create_request_token() to get the Request Token and
Request Token Secret.
3. Get the Authentication URL using
flickcurl_oauth_get_authorize_uri().
4. Show the Authentication URL to the user who approves the app
resulting in a user visible Verifier.
5. Authentication completes using
flickcurl_oauth_create_access_token() to exchange the request
token, request token secret and verifier for the final Access Token
and Access Token Secret.
6. Optionally, the flickcurl(1) utility will store in the
configuration file: oauth_token, oauth_token_secret,
oauth_client_key and oauth_client_secret. Otherwise the application
should do this.
Added an API call to upgrade from the Flickr legacy authentication to
OAuth 1.0. This revokes and deletes the legacy 'auth_token' and returns
an OAuth Access Token and Access Token Secret pair which need to be
saved.
int flickcurl_auth_oauth_getAccessToken(flickcurl* fc)
The upgrade can also be performed by using the oauth.upgrade command of
the flickcurl(1) utility.
Added new API calls to get and set OAuth parameters:
const char* flickcurl_get_oauth_token(flickcurl *fc);
void flickcurl_set_oauth_token(flickcurl *fc, const char* token);
const char* flickcurl_get_oauth_token_secret(flickcurl* fc);
void flickcurl_set_oauth_token_secret(flickcurl* fc, const char *secret);
const char* flickcurl_get_oauth_client_key(flickcurl *fc);
void flickcurl_set_oauth_client_key(flickcurl *fc, const char* client_key);
const char* flickcurl_get_oauth_client_secret(flickcurl *fc);
void flickcurl_set_oauth_client_secret(flickcurl *fc, const char* client_secre
t);
const char* flickcurl_get_oauth_request_token(flickcurl* fc);
void flickcurl_set_oauth_request_token(flickcurl *fc, const char* token);
const char* flickcurl_get_oauth_request_token_secret(flickcurl* fc);
void flickcurl_set_oauth_request_token_secret(flickcurl *fc, const char* secre
t);
Added new API calls for performing the OAuth flow
int flickcurl_oauth_create_request_token(flickcurl* fc, const char* callback);
char* flickcurl_oauth_get_authorize_uri(flickcurl* fc);
int flickcurl_oauth_create_access_token(flickcurl* fc, const char* verifier);
In flickcurl_photos_setDates() actually send date_taken parameter. This
fixes [6]GitHub issue 15
Updated configure to use xml2-config(1) and curl-config(1) as well as
pkg-config(1), for systems that do not ship with the pkg-config files,
such as OSX 10.8.
Fixed memory leak in flickcurl_build_persons() on loop exit (always)
and on the error path.
Fixed memory leak in flickcurl_build_photos() of string_value for tags.
Updated flickcurl utility to handle the OAuth authentication flow with
new commands oauth-create and oauth-verify, while still supporting
legacy Flickr auth flow with the existing -a FROB form.
Multiple internal changes in the construction of parameters to make the
code more readable and handle the extra parameters needed by OAuth.
Multiple internal changes for error path and leaks found by the LLVM
[7]clang static code analyzer.
Removed all strncpy, strcat and strcpy with counted memcpy.
2011-11-11 Dave Beckett <dave@dajobe.org>
* Snapshotted flickcurl_1_22 for 1.22 release (GIT
6698387f4240cec82b0e115adf8a863657dd7066)
* utils/oauth-test.c:
Update flickcurl_oauth_prepare_common call
* NEWS.html, src/common.c, src/flickcurl_internal.h: Disable
mtwist unless building experimental OAuth
* src/Makefile.am: Do not use libmtwist without oauth
* configure.ac, src/Makefile.am, src/common.c,
src/flickcurl_internal.h, utils/Makefile.am: Add --enable-oauth
default disabled
* src/common.c:
(flickcurl_free): Free OAuth urls
* src/oauth.c:
(test_signature_calc): Test free
* src/oauth.c: Make oauth test work again
* src/flickcurl_internal.h, src/oauth.c: Remove is_request arg -
just use od->callback
* src/common.c, src/flickcurl_internal.h, src/oauth.c,
utils/oauth-test.c: Move flickcurl_oauth_data into flickcurl
struct
* docs/flickcurl-docs.xml, docs/tmpl/section-config.sgml: Add
config section to docs
* autogen.sh, docs/tmpl/section-auth.sgml,
docs/tmpl/section-core.sgml, docs/tmpl/section-misc.sgml,
docs/tmpl/section-unused.sgml, docs/tmpl/section-upload.sgml,
libmtwist: Fix submodule checkouts
* autogen.sh: Init and update any git submodules
2011-11-09 Dave Beckett <dave@dajobe.org>
* src/flickcurl_internal.h, src/oauth.c:
Reduce visibility of oauth
internal functions These are internal to the library now because the
flickcurl_oauth_data is an internal structure.
2011-11-01 Dave Beckett <dave@dajobe.org>
* src/common.c: Return method details with curl errors
* src/Makefile.am: Clean tests
2011-10-30 Dave Beckett <dave@dajobe.org>
* utils/oauth-test.c: code style
* utils/oauth-test.c: casts
* src/oauth.c: docs
* src/oauth.c: consts
* docs/flickcurl-sections.txt: add oauth urls
* src/flickcurl_internal.h, src/oauth.c: fix const char keys
* src/oauth.c: docs
* src/oauth.c:
(flickcurl_oauth_access_token): Delete request token after success.
* src/oauth.c:
(flickcurl_oauth_build_key): Build sign key from request OR access
token
* utils/oauth-test.c: docs
* src/Makefile.am, src/oauth.c, utils/oauth-test.c: Add oauth
checksum test
* src/.gitignore: ignore *_test
2011-10-29 Dave Beckett <dave@dajobe.org>
* utils/oauth-test.c: Report request token
* src/oauth.c:
(flickcurl_oauth_prepare_common): docs and send all oauth params
except callback to requests
* src/flickcurl_internal.h, src/oauth.c, utils/oauth-test.c:
(flickcurl_oauth_access_token): Pass in verifier
* src/flickcurl_internal.h, src/oauth.c: request_token* fields
renamed from tmp_token*
* docs/flickcurl-sections.txt, src/auth-api.c, src/flickcurl.h:
Added flickr.auth.oauth.getAccessToken partial support
(flickcurl_auth_oauth_getAccessToken): Added for
flickr.auth.oauth.getAccessToken - right now it exchanges the old
tokens for OAuth ones and drops them both.
* src/flickcurl_internal.h, utils/oauth-test.c: oauth field
client_key_len renamed from client_len
* utils/oauth-test.c: FLICKCURL_MAX_OAUTH_PARAM_COUNT
* src/oauth.c: is_oauth_method fix
* src/flickcurl_internal.h, src/oauth.c:
FLICKCURL_MAX_OAUTH_PARAM_COUNT
* src/flickcurl.h, src/flickcurl_internal.h, src/oauth.c,
utils/oauth-test.c: Compute authorize URI after getting back oauth
request token (flickcurl_oauth_get_authorize_uri): Added.
* src/common.c, src/flickcurl_internal.h, src/oauth.c: Add utility
functions for oauth responses as HTTP forms
(flickcurl_invoke_get_form_content): Added to get content as k/v
array of strings.
(flickcurl_free_form): Added to free the above.
(flickcurl_oauth_request_token), flickcurl_oauth_access_token):
Use above.
* src/common.c, src/flickcurl_internal.h, src/oauth.c,
utils/Makefile.am, utils/oauth-test.c: Move OAuth test code into
oauth.c and refactor a little
* src/oauth.c:
(flickcurl_oauth_prepare_common): Do not use oath method name in
params
* libmtwist: Update to libmtwist head
* utils/oauth-test.c: Pass in (fake) flickr method for
flickcurl_oauth_prepare_common()
* src/oauth.c:
(flickcurl_oauth_prepare_common): Use http method not flickr method
* utils/oauth-test.c: remove unused srand()
* src/common.c, src/flickcurl_internal.h, src/oauth.c,
utils/oauth-test.c: Use libmtwist for PRNG for nonce
* libmtwist: Update to libmtwist head
* docs/flickcurl-sections.txt: Add symbols
* src/Makefile.am:
Add mtwist_config.h
* NEWS.html, docs/flickcurl-sections.txt:
flickcurl_get_hidden_from_string
* README.html: libmtwist submodule
2011-10-28 Dave Beckett <dave@dajobe.org>
* .gitmodules, configure.ac, libmtwist, src/Makefile.am,
src/mtwist_config.h: Add libmtwist as a git submodule
2011-10-16 Dave Beckett <dave@dajobe.org>
* src/oauth.c:
(flickcurl_oauth_compute_signature): Simplify greatly.
* src/config.c, src/flickcurl.h, utils/flickcurl.c:
(flickcurl_config_write_ini): Now writes to a filename
* utils/codegen.c, utils/flickcurl.c, utils/flickrdf.c,
utils/list-methods.c, utils/oauth-test.c: Update the utilities to
use flickcurl_config_ functions
* docs/flickcurl-sections.txt, src/common.c, src/config.c,
src/flickcurl.h: Update flickcurl config file reading and writing
support Move ini reading and writing into the library.
(flickcurl_config_read_ini): Added, deprecating read_ini_config()
and adding a flickcurl* param. Reads in library configuration.
(flickcurl_config_var_handler): Added as standard handler for
above.
(flickcurl_config_write_ini): Added to write an ini file for
library configuration.
* src/oauth.c:
(flickcurl_oauth_compute_signature): Docs and error path.
* configure.ac: Fix libcurl version check to actually check curl
not libxml twice
* configure.ac: Remove unused libcurl_min_vernum
* NEWS.html: Tim Harder is 'radhermit' on GitHub.
2011-10-15 Dave Beckett <dave@dajobe.org>
* NEWS.html: 1.22
* utils/flickcurl.c: Tidy help output; describe all upload params
defaults
* docs/flickcurl-sections.txt: Add flickcurl_get_hidden_label,
flickcurl_get_hidden_level_from_string
* src/common.c, src/flickcurl.h, src/upload-api.c,
utils/flickcurl.c: Add support for upload field 'hidden'
flickcurl_upload_params gains int param hidden with values 1 for
global and 2 for hidden.
(flickcurl_get_hidden_label, flickcurl_get_hidden_from_string):
Added utility functions to turn the int to a label and vice versa
* utils/flickcurl.c: Document upload params safety_level and
content_type
* docs/Makefile.am, docs/tmpl/section-favorite.sgml: Update tmpls
* docs/flickcurl-sections.txt:
Add flickcurl_favorites_getContext
* src/favorites-api.c, src/flickcurl.h, utils/flickcurl.c:
Implement API favorites.getContext
(flickcurl_favorites_getContext): Added returning an array of two
photo lists for previous and next photos. flickcurl utility adds
new command favorites.getContext to call above.
* src/flickcurl_internal.h, src/photo.c:
(flickcurl_new_photos_list): Added to construct a photos list
* configure.ac, src/common.c, utils/flickrdf.c: Support Raptor V2
only. Raptor V1 was last supported in January 2010
* src/panda-api.c: extras docs
2011-09-02 Dave Beckett <dajobe@digg.com>
* utils/oauth-test.c: access token testing
* src/flickcurl_internal.h: Add verifier field
2011-08-15 Dave Beckett <dave@dajobe.org>
* Merge pull request #13 from kumanna/help-without-auth (below)
Help without authentication
2011-08-14 Kumar Appaiah <a.kumar@alumni.iitm.ac.in>
* utils/flickcurl.c: Use stdout for non-error user output
Since users usually expect any non-error output to come to stdout,
this commit changes all output except error reports to be directed
to stdout.
* utils/flickcurl.c: Fix indentation
* utils/flickcurl.c: Provision for help message even when not
authenticated.
Even when not authenticated, the user might desire to see the list
of API calls available. This commit facilitates the display of
that message.
* utils/flickcurl.c: Move printing help details to a function.
This commit moves printing the help message to a function, viz.
print_help_string, so that it can be called from multiple places
without having to duplicate code. In addition, displays an extra
newline at the end for neater output.
2011-08-14 Dave Beckett <dave@dajobe.org>
* Merge pull request #12 from kumanna/kumar (below)
Fix man page and documentation quirks reported at Debian.
Debian bug http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=635892
2011-08-14 Kumar Appaiah <a.kumar@alumni.iitm.ac.in>
* utils/flickcurl.c: Fix grammatical error in description of
galleries.create
* docs/flickrdf.1: Fix incorrect spacing in flickrdf man page
Fixes an incorrect space in the reference to the flickcurl man
page.
* docs/flickrdf.1: Remove reference to missing README for flickrdf
This removes the reference to a missing README file for flickrdf.
This fixes Debian bug 637196 in flickcurl.
2011-07-28 Dave Beckett <dave@dajobe.org>
* Merge pull request #10 from radhermit/curl-headers (below)
Remove old curl header include
2011-06-25 Dave Beckett <dave@dajobe.org>
* src/flickcurl_internal.h, src/oauth.c, utils/oauth-test.c: Test
code calls Flickr OAuth endpoint with correctly signed call
2011-06-23 Dave Beckett <dave@dajobe.org>
* src/flickcurl_internal.h: ws
* src/flickcurl_internal.h, src/oauth.c, utils/oauth-test.c:
(flickcurl_oauth_build_key_data): Added internal call with API
that will change
* utils/oauth-test.c:
(oauth_build_key_data): Added
* utils/oauth-test.c:
Add a structure oauth_data
* utils/oauth-test.c:
Do URI encoding and concatenating
* src/Makefile.am, src/flickcurl_internal.h, src/oauth.c,
src/sha1.c, utils/.gitignore, utils/Makefile.am, utils/oauth-test.c:
OAuth test code
2011-05-08 Dave Beckett <dave@dajobe.org>
* src/galleries-api.c, src/method.c, src/photosets-api.c,
src/prefs-api.c, src/test-api.c, src/upload-api.c: code style
* src/person.c:
(flickcurl_build_persons): Do not zap any existing data if a field
is not found.
2011-03-31 Dave Beckett <dave@dajobe.org>
* NEWS.html: 1.22
2011-03-31 Dave Beckett <dave@dajobe.org>
* utils/Makefile.am: Add raptor_fake.h to sources and
distribution.
2011-03-30 Dave Beckett <dave@dajobe.org>
* NEWS.html, configure.ac:
Bumped version to 1.22
* docs/tmpl/section-tag.sgml:
Added flickcurl_free_tags to doc tmpls
* docs/flickcurl-sections.txt:
(flickcurl_free_tags): Added
2011-03-30 Naruto TAKAHASHI <tnaruto@gmail.com>
* src/flickcurl.h, src/photo.c, src/tags.c: add
flickcurl_free_tags
* docs/tmpl/section-photoset.sgml, src/flickcurl.h,
src/photoset.c: move owner filed to the end of the structure.
2011-03-29 Naruto TAKAHASHI <tnaruto@gmail.com>
* docs/tmpl/section-photoset.sgml, src/flickcurl.h,
src/photoset.c: add owner to flickcurl_photoset
Flickcurl is a C library for the Flickr API, handling creating the
requests, signing, token management, calling the API, marshalling
request parameters and decoding responses. It uses libcurl to call
the REST web service and libxml2 to manipulate the XML responses.
Flickcurl supports all of the API including the functions for
photo/video uploading, browsing, searching, adding and editing
comments, groups, notes, photosets, categories, activity, blogs,
favorites, places, tags, machine tags, institutions, pandas and
photo/video metadata. It also includes a program flickrdf to turn
photo metadata, tags, machine tags and places into an RDF triples
description.