## section-blogs

section-blogs

## Functions

flickcurl_blog ** | flickcurl_blogs_getList ()
flickcurl_blog_service ** | flickcurl_blogs_getServices ()
int | flickcurl_blogs_postPhoto ()
void | flickcurl_free_blogs ()
void | flickcurl_free_blog_services ()

## Types and Values

| flickcurl_blog
| flickcurl_blog_service

## Description

## Functions

### flickcurl_blogs_getList ()

    flickcurl_blog **
    flickcurl_blogs_getList (flickcurl *fc);

Get a list of configured blogs for the calling user.

Implements flickr.blogs.getList (1.0)

#### Parameters

fc | flickcurl context |

#### Returns

non-0 on failure

### flickcurl_blogs_getServices ()

    flickcurl_blog_service **
    flickcurl_blogs_getServices (flickcurl *fc);

Return a list of Flickr supported blogging services

Implements flickr.blogs.getServices (1.12)

#### Parameters

fc | flickcurl context |

#### Returns

list of services or NULL on failure

### flickcurl_blogs_postPhoto ()

    int
    flickcurl_blogs_postPhoto (flickcurl *fc,
                               const char *blog_id,
                               const char *photo_id,
                               const char *title,
                               const char *description,
                               const char *blog_password);

Post a photo to a blog/

Implements flickr.blogs.postPhoto (1.0)

#### Parameters

fc | flickcurl context |
blog_id | The id of the blog to post to |
photo_id | The id of the photo to blog |
title | The blog post title |
description | The blog post body |
blog_password | The password for the blog (used when the blog does not have a stored password) (or NULL) |

#### Returns

non-0 on failure

### flickcurl_free_blogs ()

    void
    flickcurl_free_blogs (flickcurl_blog **blogs_object);

Destructor for array of blog objects

#### Parameters

blogs_object | blog object array |

### flickcurl_free_blog_services ()

    void
    flickcurl_free_blog_services (flickcurl_blog_service **blog_services_object);

Destructor for array of blog services objects

#### Parameters

blog_services_object | blog services object array |

## Types and Values

### flickcurl_blog

    typedef struct {
      char* id;
      char* name;
      int needs_password;
      char* url;
    } flickcurl_blog;

A blog.

#### Members

char *`id`; | ID |
char *`name`; | Group Name |
int `needs_password`; | needs password |
char *`url`; | URL |

### flickcurl_blog_service

    typedef struct {
      char* id;
      char* name;
    } flickcurl_blog_service;

A blog service.

#### Members

char *`id`; | ID |
char *`name`; | Service Name |