Flickrex.Flickr.Tags (flickrex v0.8.1) View Source

Link to this section Summary

Functions

Returns the first 24 photos for a given tag cluster

Gives you a list of tag clusters for the given tag.

Returns a list of hot tags for the given period.

Get the tag list for a given photo.

Get the tag list for a given user (or the currently logged in user).

Get the popular tags for a given user (or the currently logged in user).

Get the raw versions of a given tag (or all tags) for the currently logged-in user.

Returns a list of most frequently used tags for a user.

Returns a list of tags 'related' to the given tag, based on clustered usage analysis.

Link to this section Types

Link to this section Functions

Link to this function

get_cluster_photos(tag, cluster_id, opts \\ [])

View Source

Specs

get_cluster_photos(arg(), arg(), opts()) :: operation()

Returns the first 24 photos for a given tag cluster

This method does not require authentication.

Arguments

  • tag - The tag that this cluster belongs to.

  • cluster_id - The top three tags for the cluster, separated by dashes (just like the url).

Link to this function

get_clusters(tag, opts \\ [])

View Source

Specs

get_clusters(arg(), opts()) :: operation()

Gives you a list of tag clusters for the given tag.

This method does not require authentication.

Arguments

  • tag - The tag to fetch clusters for.

Example response

%{
  "clusters" => %{
    "cluster" => [
      %{
        "tag" => [
          %{"_content" => "farm"},
          %{"_content" => "animals"},
          %{"_content" => "cattle"}
        ],
        "total" => "3"
      },
      %{
        "tag" => [
          %{"_content" => "green"},
          %{"_content" => "landscape"},
          %{"_content" => "countryside"}
        ],
        "total" => "3"
      }
    ],
    "source" => "cows",
    "total" => "2"
  },
  "stat" => "ok"
}
Link to this function

get_hot_list(opts \\ [])

View Source

Specs

get_hot_list(opts()) :: operation()

Returns a list of hot tags for the given period.

This method does not require authentication.

Options

  • period - The period for which to fetch hot tags. Valid values are <code>day</code> and <code>week</code> (defaults to <code>day</code>).

  • count - The number of tags to return. Defaults to 20. Maximum allowed value is 200.

Example response

%{
  "hottags" => %{
    "count" => "6",
    "period" => "day",
    "tag" => [
      %{"_content" => "northerncalifornia", "score" => "20"},
      %{"_content" => "top20", "score" => "18"},
      %{"_content" => "keychain", "score" => "15"},
      %{"_content" => "zb", "score" => "10"},
      %{"_content" => "selfportraittuesday", "score" => "9"},
      %{"_content" => "jan06", "score" => "4"}
    ]
  },
  "stat" => "ok"
}
Link to this function

get_list_photo(photo_id, opts \\ [])

View Source

Specs

get_list_photo(arg(), opts()) :: operation()

Get the tag list for a given photo.

This method does not require authentication.

Arguments

  • photo_id - The id of the photo to return tags for.

Example response

%{
  "photo" => %{
    "id" => "2619",
    "tags" => %{
      "tag" => [
        %{
          "_content" => "tag1",
          "author" => "12037949754@N01",
          "authorname" => "Bees",
          "id" => "156",
          "raw" => "tag 1"
        },
        %{
          "_content" => "tag2",
          "author" => "12037949754@N01",
          "authorname" => "Bees",
          "id" => "157",
          "raw" => "tag 2"
        }
      ]
    }
  },
  "stat" => "ok"
}
Link to this function

get_list_user(opts \\ [])

View Source

Specs

get_list_user(opts()) :: operation()

Get the tag list for a given user (or the currently logged in user).

This method does not require authentication.

Options

  • user_id - The NSID of the user to fetch the tag list for. If this argument is not specified, the currently logged in user (if any) is assumed.

Example response

%{
  "stat" => "ok",
  "who" => %{
    "id" => "12037949754@N01",
    "tags" => %{
      "tag" => [
        %{"_content" => "gull"},
        %{"_content" => "tag1"},
        %{"_content" => "tag2"},
        %{"_content" => "tags"},
        %{"_content" => "test"}
      ]
    }
  }
}
Link to this function

get_list_user_popular(opts \\ [])

View Source

Specs

get_list_user_popular(opts()) :: operation()

Get the popular tags for a given user (or the currently logged in user).

This method does not require authentication.

Options

  • user_id - The NSID of the user to fetch the tag list for. If this argument is not specified, the currently logged in user (if any) is assumed.

  • count - Number of popular tags to return. defaults to 10 when this argument is not present.

Example response

%{
  "stat" => "ok",
  "who" => %{
    "id" => "12037949754@N01",
    "tags" => %{
      "tag" => [
        %{"_content" => "bar", "count" => "10"},
        %{"_content" => "foo", "count" => "11"},
        %{"_content" => "gull", "count" => "147"},
        %{"_content" => "tags", "count" => "3"},
        %{"_content" => "test", "count" => "3"}
      ]
    }
  }
}
Link to this function

get_list_user_raw(opts \\ [])

View Source

Specs

get_list_user_raw(opts()) :: operation()

Get the raw versions of a given tag (or all tags) for the currently logged-in user.

This method does not require authentication.

Options

  • tag - The tag you want to retrieve all raw versions for.

Example response

%{
  "stat" => "ok",
  "who" => %{
    "id" => "12037949754@N01",
    "tags" => %{
      "tag" => %{
        "clean" => "foo",
        "raw" => [
          %{"_content" => "foo"},
          %{"_content" => "Foo"},
          %{"_content" => "f:oo"}
        ]
      }
    }
  }
}
Link to this function

get_most_frequently_used(opts \\ [])

View Source

Specs

get_most_frequently_used(opts()) :: operation()

Returns a list of most frequently used tags for a user.

This method requires authentication with "read" permission.

Example response

%{
  "stat" => "ok",
  "who" => %{
    "id" => "30135021@N05",
    "tags" => %{
      "tag" => [
        %{"_content" => "blah", "count" => "1"},
        %{"_content" => "publicdomain", "count" => "5"}
      ]
    }
  }
}
Link to this function

get_related(tag, opts \\ [])

View Source

Specs

get_related(arg(), opts()) :: operation()

Returns a list of tags 'related' to the given tag, based on clustered usage analysis.

This method does not require authentication.

Arguments

  • tag - The tag to fetch related tags for.

Example response

%{
  "stat" => "ok",
  "tags" => %{
    "source" => "london",
    "tag" => [
      %{"_content" => "england"},
      %{"_content" => "thames"},
      %{"_content" => "tube"},
      %{"_content" => "bigben"},
      %{"_content" => "uk"}
    ]
  }
}