yandex-api-fotki 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 198827d3dbac1ef0b14850fea8dab0e73f1ce5cc
4
- data.tar.gz: 795c835e7b624c9344f10b5e95f81a077a6087f3
3
+ metadata.gz: e9cfa966b4c28bc21388f42d9d6fd49b86c48c8c
4
+ data.tar.gz: 2d42f03a50f897d18348baab278897363f2db6ae
5
5
  SHA512:
6
- metadata.gz: 6186894e58cf7eea30639d9fb07df6bc7f57a99862dc6f2df87a64f4564b3890ba48d2a389a8ab26c02ffd8fc7dc6a647cf7c1c0566f9f466953390d8da8b885
7
- data.tar.gz: add2404c1c7afe16acf4ac562efe98dbfa60aa35ac954a334e8a1b0de971a468a4ea5784de994cf38951935417e6826ed5f312622f4ca529d388c07abe6887d7
6
+ metadata.gz: 678536b7cefb8e10b51b64959339f256934f851d8bc4ae33ec8f95b5087dff7521e22182a6f179252fe279c212213779d554bc2044d8a7e54172a080979019f7
7
+ data.tar.gz: ce87d1d8042c2b8b3ec4298eac849d84737617dee4cdf268c73aa3877a0669d451304da6cafef68d93dc6cf260a32781b9a1ccbe55180a36cd3714a9d1f69794
data/README.md CHANGED
@@ -1,5 +1,6 @@
1
1
  # Yandex::Api::Fotki
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/yandex-api-fotki.svg)](https://rubygems.org/gems/yandex-api-fotki)
3
4
  [![Build Status](https://travis-ci.org/1v/yandex-api-fotki.svg?branch=master)](https://travis-ci.org/1v/yandex-api-fotki)
4
5
  [![Dependency Status](https://gemnasium.com/badges/github.com/1v/yandex-api-fotki.svg)](https://gemnasium.com/github.com/1v/yandex-api-fotki)
5
6
  [![Code Climate](https://codeclimate.com/github/1v/yandex-api-fotki/badges/gpa.svg)](https://codeclimate.com/github/1v/yandex-api-fotki)
@@ -22,22 +23,45 @@ And then execute:
22
23
  Or install it yourself as:
23
24
 
24
25
  $ gem install yandex-api-fotki
26
+
27
+ And require:
28
+ ```ruby
29
+ require 'yandex-api-fotki'
30
+ ```
25
31
 
26
32
  ## Usage
27
- Инструкция как получить OAUTH_CODE https://tech.yandex.ru/oauth/doc/dg/tasks/get-oauth-token-docpage/
33
+ Instruction how to get OAUTH_CODE [`tech.yandex.ru`](https://tech.yandex.ru/oauth/doc/dg/tasks/get-oauth-token-docpage/)
28
34
  ```ruby
29
35
  fotki = Yandex::API::Fotki.oauth(OAUTH_CODE)
30
36
  photo = fotki.photos.upload(:image => File.new('/file.png'),
31
37
  :access => 'private',
32
38
  :album => 123456,
33
39
  :title => "My Image")
34
- orig = photo.links['orig']['href']
35
- => http://img-fotki.yandex.ru/get/117982/392595458.57fe/0_26753c_713f7b6a_orig
40
+ photo.id
41
+ => 123456
42
+ photo.links
43
+ => {
44
+ "XXS" => {
45
+ "height" => "75",
46
+ "href" => "http://img-fotki.yandex.ru/get/123456/123456468.56be/0_123bcc_ad08a9de_XXS",
47
+ "size" => "XXS",
48
+ "width" => "75"
49
+ },
50
+ ...
51
+ "orig" => {
52
+ "bytesize" => "0",
53
+ "height" => "237",
54
+ "href" => "http://img-fotki.yandex.ru/get/123456/123456468.56be/0_1234bcc_ad08a9de_orig",
55
+ "size" => "orig",
56
+ "width" => "200"
57
+ }
58
+ }
36
59
  ```
60
+ All available options: [`tech.yandex.ru`](https://tech.yandex.ru/fotki/doc/concepts/add-photo-docpage/#multipart-format)
37
61
 
38
62
  ## Documentation
39
63
 
40
- http://www.rubydoc.info/github/1v/yandex-api-fotki/
64
+ [`www.rubydoc.info`](http://www.rubydoc.info/github/1v/yandex-api-fotki/)
41
65
 
42
66
  ## License
43
67
 
@@ -0,0 +1 @@
1
+ require_relative 'yandex/api/fotki'
@@ -1,7 +1,7 @@
1
1
  module Yandex
2
2
  module API
3
3
  module Fotki
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  end
6
6
  end
7
7
  end
@@ -27,5 +27,5 @@ Gem::Specification.new do |spec|
27
27
  spec.add_development_dependency "bundler", "~> 1.13"
28
28
  spec.add_development_dependency "rake", "~> 10.0"
29
29
  spec.add_development_dependency "rspec", "~> 3.0"
30
- spec.add_development_dependency "codeclimate-test-reporter"
30
+ spec.add_development_dependency "codeclimate-test-reporter", "~> 0.6", ">= 0.6.0"
31
31
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yandex-api-fotki
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - github.com/1v
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-10-07 00:00:00.000000000 Z
11
+ date: 2016-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -90,16 +90,22 @@ dependencies:
90
90
  name: codeclimate-test-reporter
91
91
  requirement: !ruby/object:Gem::Requirement
92
92
  requirements:
93
+ - - "~>"
94
+ - !ruby/object:Gem::Version
95
+ version: '0.6'
93
96
  - - ">="
94
97
  - !ruby/object:Gem::Version
95
- version: '0'
98
+ version: 0.6.0
96
99
  type: :development
97
100
  prerelease: false
98
101
  version_requirements: !ruby/object:Gem::Requirement
99
102
  requirements:
103
+ - - "~>"
104
+ - !ruby/object:Gem::Version
105
+ version: '0.6'
100
106
  - - ">="
101
107
  - !ruby/object:Gem::Version
102
- version: '0'
108
+ version: 0.6.0
103
109
  description: Yandex Fotki API wrapper
104
110
  email:
105
111
  - forwardin@yandex.ru
@@ -118,6 +124,7 @@ files:
118
124
  - Rakefile
119
125
  - bin/console
120
126
  - bin/setup
127
+ - lib/yandex-api-fotki.rb
121
128
  - lib/yandex/api/fotki.rb
122
129
  - lib/yandex/api/fotki/version.rb
123
130
  - yandex-api-fotki.gemspec