<commit_before># Flickrie [![Build Status](https://secure.travis-ci.org/janko-m/flickrie.png)](http://travis-ci.org/janko-m/flickrie)

## About

This gem is a nice wrapper for the Flickr API with an object-oriented interface.

The reason why I did this gem is because the existing ones either weren't
well maintained, or they weren't object oriented and provided a literal
wrapper over the API. That didn't statisfy me, because Flickr API
sometimes gives you the same information in different ways. And I want
to normalize that. Also, JSON responses can return "time" attributes
only in the string format. And I thought it would be nice that, if you're
accessing the `updated_at` attribute for example, you actually **get**
an instance of `Time`, instead of a string, or even integer. These are
just some of the reason I decided to make this gem.

The method names here aren't called the same as Flickr's API methods
(and they can't be), but they follow a pattern which
shouldn't be too difficult to predict. Take a look at the ["Currently covered API
methods"](https://github.com/janko-m/flickrie#currently-covered-api-methods) section of this readme.

Also, some attribute names that you get from the response are changed.
So, for example, the `last_update` attribute is called `updated_at`,
and the `candownload` attribute is called `can_download?`. Because this
is a **ruby** wrapper, I wanted to write it in Ruby/Rails fashion. At
first you might not approve of this, because then you might not know
what the methods name are if you know the name of the key in the
response hash. But, on the other hand, Flickr often gives you the same
information in different formats, so this also acts as a normalizer. The
downsize of this approach is that it may not be up to date when the
Flickr API changes, but that's why I have **you** to open a new issue
when you notice something isn't working :)

The gem works on Ruby versions `1.9.2` and `1.9.3`. Also, it follows
[Semantic versioning](http://semver.org/).

## Examples of usage

You first need to install the gem.

```
[sudo] gem install flickrie
```

Then, if you're using Bundler in your project, put it into your `Gemfile`:

```ruby
gem "flickrie", "~> 1.0.0"
```

Then in your app you set the API key and shared secret (if you don't have them
already, you can apply for them [here](http://www.flickr.com/services/apps/create/apply)).

```ruby
require 'flickrie'

Flickrie.api_key = "API_KEY"
Flickrie.shared_secret = "SHARED_SECRET"
```

If your in Rails, it's a good idea to put this into an initializer.

Now you can search for stuff.
<commit_msg>This gem sometimes introduces new things in patch releases<commit_after># Flickrie [![Build Status](https://secure.travis-ci.org/janko-m/flickrie.png)](http://travis-ci.org/janko-m/flickrie)

## About

This gem is a nice wrapper for the Flickr API with an object-oriented interface.

The reason why I did this gem is because the existing ones either weren't
well maintained, or they weren't object oriented and provided a literal
wrapper over the API. That didn't statisfy me, because Flickr API
sometimes gives you the same information in different ways. And I want
to normalize that. Also, JSON responses can return "time" attributes
only in the string format. And I thought it would be nice that, if you're
accessing the `updated_at` attribute for example, you actually **get**
an instance of `Time`, instead of a string, or even integer. These are
just some of the reason I decided to make this gem.

The method names here aren't called the same as Flickr's API methods
(and they can't be), but they follow a pattern which
shouldn't be too difficult to predict. Take a look at the ["Currently covered API
methods"](https://github.com/janko-m/flickrie#currently-covered-api-methods) section of this readme.

Also, some attribute names that you get from the response are changed.
So, for example, the `last_update` attribute is called `updated_at`,
and the `candownload` attribute is called `can_download?`. Because this
is a **ruby** wrapper, I wanted to write it in Ruby/Rails fashion. At
first you might not approve of this, because then you might not know
what the methods name are if you know the name of the key in the
response hash. But, on the other hand, Flickr often gives you the same
information in different formats, so this also acts as a normalizer. The
downsize of this approach is that it may not be up to date when the
Flickr API changes, but that's why I have **you** to open a new issue
when you notice something isn't working :)

The gem works on Ruby versions `1.9.2` and `1.9.3`.

## Examples of usage

You first need to install the gem.

```
[sudo] gem install flickrie
```

Then, if you're using Bundler in your project, put it into your `Gemfile`:

```ruby
gem "flickrie", "~> 1.0.0"
```

Then in your app you set the API key and shared secret (if you don't have them
already, you can apply for them [here](http://www.flickr.com/services/apps/create/apply)).

```ruby
require 'flickrie'

Flickrie.api_key = "API_KEY"
Flickrie.shared_secret = "SHARED_SECRET"
```

If your in Rails, it's a good idea to put this into an initializer.

Now you can search for stuff.

{'fraction_non_alphanumeric': 0.08065447545717036, 'fraction_numerical': 0.0034648700673724736, 'mean_word_length': 4.351184346035016, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3151890', 'n_tokens_mistral': 1557, 'n_tokens_neox': 1475, 'n_words': 789}