Esempio n. 1
0
/**
 * flickcurl_people_findByUsername:
 * @fc: flickcurl context
 * @username: username
 * 
 * Get a user's NSID, given their username address
 *
 * Implements flickr.people.findByUsername (0.8)
 * 
 * Return value: NSID or NULL on failure
 **/
char*
flickcurl_people_findByUsername(flickcurl* fc, const char* username)
{
  return flickcurl_call_get_one_string_field(fc, "username", username, 
                                             "flickr.people.findByUsername",
                                             (const xmlChar*)"/rsp/user/@nsid");
}
Esempio n. 2
0
/**
 * flickcurl_people_findByEmail:
 * @fc: flickcurl context
 * @email: user email address
 * 
 * Get a user's NSID, given their email address
 *
 * Implements flickr.people.findByEmail (0.8)
 * 
 * Return value: NSID or NULL on failure
 **/
char*
flickcurl_people_findByEmail(flickcurl* fc, const char* email)
{
  return flickcurl_call_get_one_string_field(fc, "find_email", email, 
                                             "flickr.people.findByEmail",
                                             (const xmlChar*)"/rsp/user/@nsid");
}
Esempio n. 3
0
/**
 * flickcurl_prefs_getGeoPerms:
 * @fc: flickcurl context
 * 
 * Returns the default privacy level for geographic information attached to the user's photos. 
 *
 * Possible values are: 0: no default, 1: public, 2: contacts only, 3: friends
 * and family only, 4: friends only, 5: family only, 6: private.
 *
 * Implements flickr.prefs.getGeoPerms (1.4)
 * 
 * Return value: non-0 on failure
 **/
int
flickcurl_prefs_getGeoPerms(flickcurl* fc)
{
  char* v;
  int r= -1;

  v = flickcurl_call_get_one_string_field(fc, NULL, NULL,
                                        "flickr.prefs.getGeoPerms",
                                        (const xmlChar*)"/rsp/person/@geoperms");
  if(v) {
    r = atoi(v);
    free(v);
  }

  return r;
}