pinterest-ruby 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +7 -0
- data/.rubocop.yml +63 -0
- data/.travis-gemfile +17 -0
- data/.travis.yml +12 -0
- data/.yardopts +1 -0
- data/CHANGELOG.md +3 -0
- data/Gemfile +24 -0
- data/README.md +34 -0
- data/Rakefile +44 -0
- data/docs/FaradayMiddleware/SafeOj.html +218 -0
- data/docs/FaradayMiddleware.html +125 -0
- data/docs/Pinterest/Board.html +410 -0
- data/docs/Pinterest/Client.html +1894 -0
- data/docs/Pinterest/Collection.html +1877 -0
- data/docs/Pinterest/Endpoints/Authentication.html +578 -0
- data/docs/Pinterest/Endpoints/Boards.html +1443 -0
- data/docs/Pinterest/Endpoints/Pins.html +1296 -0
- data/docs/Pinterest/Endpoints/Users.html +1220 -0
- data/docs/Pinterest/Endpoints.html +127 -0
- data/docs/Pinterest/Entity.html +473 -0
- data/docs/Pinterest/Errors/AuthorizationError.html +158 -0
- data/docs/Pinterest/Errors/BadRequestError.html +158 -0
- data/docs/Pinterest/Errors/BaseError.html +487 -0
- data/docs/Pinterest/Errors/MethodNotAllowedError.html +158 -0
- data/docs/Pinterest/Errors/NotFoundError.html +158 -0
- data/docs/Pinterest/Errors/NotImplementedError.html +158 -0
- data/docs/Pinterest/Errors/PermissionsError.html +158 -0
- data/docs/Pinterest/Errors/RateLimitError.html +158 -0
- data/docs/Pinterest/Errors/ServerError.html +158 -0
- data/docs/Pinterest/Errors/TimeoutError.html +158 -0
- data/docs/Pinterest/Errors.html +377 -0
- data/docs/Pinterest/Image.html +617 -0
- data/docs/Pinterest/Interest.html +402 -0
- data/docs/Pinterest/Pin.html +511 -0
- data/docs/Pinterest/User.html +408 -0
- data/docs/Pinterest/Version.html +187 -0
- data/docs/Pinterest.html +130 -0
- data/docs/_index.html +401 -0
- data/docs/class_list.html +51 -0
- data/docs/css/common.css +1 -0
- data/docs/css/full_list.css +58 -0
- data/docs/css/style.css +492 -0
- data/docs/file.README.html +106 -0
- data/docs/file_list.html +56 -0
- data/docs/frames.html +17 -0
- data/docs/index.html +106 -0
- data/docs/js/app.js +243 -0
- data/docs/js/full_list.js +216 -0
- data/docs/js/jquery.js +4 -0
- data/docs/method_list.html +643 -0
- data/docs/top-level-namespace.html +110 -0
- data/lib/pinterest/client.rb +146 -0
- data/lib/pinterest/collection.rb +97 -0
- data/lib/pinterest/endpoints/authentication.rb +99 -0
- data/lib/pinterest/endpoints/boards.rb +193 -0
- data/lib/pinterest/endpoints/pins.rb +187 -0
- data/lib/pinterest/endpoints/users.rb +158 -0
- data/lib/pinterest/errors.rb +94 -0
- data/lib/pinterest/models/board.rb +34 -0
- data/lib/pinterest/models/entity.rb +42 -0
- data/lib/pinterest/models/image.rb +49 -0
- data/lib/pinterest/models/interest.rb +30 -0
- data/lib/pinterest/models/pin.rb +43 -0
- data/lib/pinterest/models/user.rb +33 -0
- data/lib/pinterest/safe_oj.rb +25 -0
- data/lib/pinterest/version.rb +23 -0
- data/lib/pinterest.rb +31 -0
- data/pinterest.gemspec +32 -0
- data/spec/cassettes/Pinterest_Client/_perform_network_request_private_/should_correctly_handle_malformed_requests.yml +51 -0
- data/spec/cassettes/Pinterest_Endpoints_Authentication/_fetch_access_token/should_make_the_call_to_Pinterest_and_return_the_authorization_token_also_saving_it.yml +58 -0
- data/spec/cassettes/Pinterest_Endpoints_Authentication/_verify_access_token/should_return_an_exception_when_using_an_invalid_token.yml +52 -0
- data/spec/cassettes/Pinterest_Endpoints_Authentication/_verify_access_token/should_verify_the_token.yml +59 -0
- data/spec/cassettes/Pinterest_Endpoints_Boards/_board/should_complain_for_invalid_boards.yml +48 -0
- data/spec/cassettes/Pinterest_Endpoints_Boards/_board/should_get_the_current_informations.yml +63 -0
- data/spec/cassettes/Pinterest_Endpoints_Boards/_board/should_restrict_to_requested_fields.yml +57 -0
- data/spec/cassettes/Pinterest_Endpoints_Boards/_boards/should_only_get_requested_fields.yml +57 -0
- data/spec/cassettes/Pinterest_Endpoints_Boards/_boards/should_return_a_list_of_boards.yml +74 -0
- data/spec/cassettes/Pinterest_Endpoints_Boards/_create_board/should_create_the_board_and_return_it_with_only_the_requested_fields.yml +56 -0
- data/spec/cassettes/Pinterest_Endpoints_Boards/_delete_board/should_perform_the_call_and_return_an_error.yml +48 -0
- data/spec/cassettes/Pinterest_Endpoints_Boards/_delete_board/should_perform_the_call_and_return_true.yml +109 -0
- data/spec/cassettes/Pinterest_Endpoints_Boards/_edit_board/should_edit_the_board_and_return_it_with_only_the_requested_fields.yml +56 -0
- data/spec/cassettes/Pinterest_Endpoints_Boards/_follow_board/should_complain_for_invalid_boards.yml +56 -0
- data/spec/cassettes/Pinterest_Endpoints_Boards/_follow_board/should_perform_the_call_and_return_true.yml +109 -0
- data/spec/cassettes/Pinterest_Endpoints_Boards/_following_boards/should_only_get_requested_fields.yml +59 -0
- data/spec/cassettes/Pinterest_Endpoints_Boards/_following_boards/should_paginate_correctly.yml +72 -0
- data/spec/cassettes/Pinterest_Endpoints_Boards/_following_boards/should_return_the_followed_boards.yml +72 -0
- data/spec/cassettes/Pinterest_Endpoints_Boards/_search_my_boards/should_only_get_requested_fields.yml +59 -0
- data/spec/cassettes/Pinterest_Endpoints_Boards/_search_my_boards/should_paginate_correctly.yml +66 -0
- data/spec/cassettes/Pinterest_Endpoints_Boards/_search_my_boards/should_search_boards.yml +75 -0
- data/spec/cassettes/Pinterest_Endpoints_Boards/_suggested_boards/should_return_the_suggested_boards_returning_only_the_requested_fields.yml +56 -0
- data/spec/cassettes/Pinterest_Endpoints_Boards/_unfollow_board/should_complain_for_invalid_boards.yml +56 -0
- data/spec/cassettes/Pinterest_Endpoints_Boards/_unfollow_board/should_perform_the_call_and_return_true.yml +109 -0
- data/spec/cassettes/Pinterest_Endpoints_Pins/_board_pins/should_only_get_requested_fields.yml +59 -0
- data/spec/cassettes/Pinterest_Endpoints_Pins/_board_pins/should_paginate_correctly.yml +85 -0
- data/spec/cassettes/Pinterest_Endpoints_Pins/_board_pins/should_return_the_pins_of_the_board.yml +85 -0
- data/spec/cassettes/Pinterest_Endpoints_Pins/_create_pin/should_create_a_pin_by_using_a_image_URL.yml +71 -0
- data/spec/cassettes/Pinterest_Endpoints_Pins/_create_pin/should_create_a_pin_by_using_a_image_file.yml +1997 -0
- data/spec/cassettes/Pinterest_Endpoints_Pins/_create_pin/should_return_a_pin_containing_only_requested_fields.yml +56 -0
- data/spec/cassettes/Pinterest_Endpoints_Pins/_delete_pin/should_perform_the_call_and_return_an_error.yml +56 -0
- data/spec/cassettes/Pinterest_Endpoints_Pins/_delete_pin/should_perform_the_call_and_return_true.yml +109 -0
- data/spec/cassettes/Pinterest_Endpoints_Pins/_edit_pin/should_edit_the_pin_and_return_it_with_only_the_requested_fields.yml +56 -0
- data/spec/cassettes/Pinterest_Endpoints_Pins/_likes/should_only_get_requested_fields.yml +58 -0
- data/spec/cassettes/Pinterest_Endpoints_Pins/_likes/should_paginate_correctly.yml +87 -0
- data/spec/cassettes/Pinterest_Endpoints_Pins/_likes/should_return_the_list_of_liked_pins.yml +85 -0
- data/spec/cassettes/Pinterest_Endpoints_Pins/_pin/should_complain_for_non_existent_pins.yml +56 -0
- data/spec/cassettes/Pinterest_Endpoints_Pins/_pin/should_get_the_current_informations.yml +71 -0
- data/spec/cassettes/Pinterest_Endpoints_Pins/_pin/should_restrict_to_requested_fields.yml +56 -0
- data/spec/cassettes/Pinterest_Endpoints_Pins/_pins/should_only_get_requested_fields.yml +59 -0
- data/spec/cassettes/Pinterest_Endpoints_Pins/_pins/should_paginate_correctly.yml +808 -0
- data/spec/cassettes/Pinterest_Endpoints_Pins/_pins/should_return_my_pins.yml +88 -0
- data/spec/cassettes/Pinterest_Endpoints_Pins/_search_my_pins/should_only_get_requested_fields.yml +61 -0
- data/spec/cassettes/Pinterest_Endpoints_Pins/_search_my_pins/should_paginate_correctly.yml +89 -0
- data/spec/cassettes/Pinterest_Endpoints_Pins/_search_my_pins/should_search_my_pins.yml +89 -0
- data/spec/cassettes/Pinterest_Endpoints_Users/_follow_interest/should_perform_the_call_and_return_an_error.yml +48 -0
- data/spec/cassettes/Pinterest_Endpoints_Users/_follow_user/should_complain_for_invalid_users.yml +56 -0
- data/spec/cassettes/Pinterest_Endpoints_Users/_follow_user/should_perform_the_call_and_return_true.yml +109 -0
- data/spec/cassettes/Pinterest_Endpoints_Users/_followers/should_only_get_requested_fields.yml +62 -0
- data/spec/cassettes/Pinterest_Endpoints_Users/_followers/should_paginate_correctly.yml +62 -0
- data/spec/cassettes/Pinterest_Endpoints_Users/_followers/should_return_a_list_of_followers.yml +62 -0
- data/spec/cassettes/Pinterest_Endpoints_Users/_following_users/should_only_get_requested_fields.yml +62 -0
- data/spec/cassettes/Pinterest_Endpoints_Users/_following_users/should_paginate_correctly.yml +131 -0
- data/spec/cassettes/Pinterest_Endpoints_Users/_following_users/should_return_a_list_of_followed_users.yml +66 -0
- data/spec/cassettes/Pinterest_Endpoints_Users/_interests/should_paginate_correctly.yml +112 -0
- data/spec/cassettes/Pinterest_Endpoints_Users/_interests/should_return_a_list_of_followed_interest.yml +58 -0
- data/spec/cassettes/Pinterest_Endpoints_Users/_me/should_get_the_current_informations.yml +62 -0
- data/spec/cassettes/Pinterest_Endpoints_Users/_me/should_restrict_to_requested_fields.yml +56 -0
- data/spec/cassettes/Pinterest_Endpoints_Users/_unfollow_interest/should_perform_the_call_and_return_an_error.yml +48 -0
- data/spec/cassettes/Pinterest_Endpoints_Users/_unfollow_user/should_complain_for_invalid_users.yml +56 -0
- data/spec/cassettes/Pinterest_Endpoints_Users/_unfollow_user/should_perform_the_call_and_return_true.yml +109 -0
- data/spec/cassettes/Pinterest_Endpoints_Users/_user/should_complain_for_non_existent_users.yml +56 -0
- data/spec/cassettes/Pinterest_Endpoints_Users/_user/should_get_the_current_informations.yml +60 -0
- data/spec/cassettes/Pinterest_Endpoints_Users/_user/should_restrict_to_requested_fields.yml +56 -0
- data/spec/pinterest/client_spec.rb +70 -0
- data/spec/pinterest/collection_spec.rb +82 -0
- data/spec/pinterest/endpoints/authentication_spec.rb +81 -0
- data/spec/pinterest/endpoints/boards_spec.rb +209 -0
- data/spec/pinterest/endpoints/pins_spec.rb +239 -0
- data/spec/pinterest/endpoints/users_spec.rb +194 -0
- data/spec/pinterest/errors_spec.rb +59 -0
- data/spec/pinterest/fixtures/first.jpg +0 -0
- data/spec/pinterest/models/board_spec.rb +48 -0
- data/spec/pinterest/models/entity_spec.rb +35 -0
- data/spec/pinterest/models/image_spec.rb +50 -0
- data/spec/pinterest/models/interest_spec.rb +20 -0
- data/spec/pinterest/models/pin_spec.rb +55 -0
- data/spec/pinterest/models/user_spec.rb +45 -0
- data/spec/spec_helper.rb +49 -0
- data/tester.rb +19 -0
- metadata +341 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 2d369e701c5672bb417761756a5ef61c0c0d2c0a
|
4
|
+
data.tar.gz: 0e0f84e70e03e0f140272e639c3b085c4aaa90cc
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 47d999f14e2686a8ad26b80764ed7ef8d954429ac4985ce4dcc4df80617270877e64ab65f554096aefc5ffc945ae694c77cb3db0441302ef1bdcd3330ff92014
|
7
|
+
data.tar.gz: 7cfaa001d6794bf140ca1590711b7aed3336efecf2b037680765508270ade54d31c433fa212e905dd6eeacd3872b1ee16da4928c8bbc9564c35d7f920a77ac79
|
data/.gitignore
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,63 @@
|
|
1
|
+
#
|
2
|
+
# This file is part of the pinterest-ruby gem. Copyright (C) 2017 and above Shogun <shogun@cowtech.it>.
|
3
|
+
# Licensed under the MIT license, which can be found at http://www.opensource.org/licenses/mit-license.php.
|
4
|
+
#
|
5
|
+
|
6
|
+
AllCops:
|
7
|
+
TargetRubyVersion: 2.2
|
8
|
+
Include:
|
9
|
+
- "Rakefile"
|
10
|
+
- "Gemfile"
|
11
|
+
Exclude:
|
12
|
+
- "spec/**/*"
|
13
|
+
|
14
|
+
Alias:
|
15
|
+
Enabled: false
|
16
|
+
|
17
|
+
AsciiComments:
|
18
|
+
Enabled: false
|
19
|
+
|
20
|
+
Blocks:
|
21
|
+
Enabled: false
|
22
|
+
|
23
|
+
BracesAroundHashParameters:
|
24
|
+
Enabled: false
|
25
|
+
|
26
|
+
CyclomaticComplexity:
|
27
|
+
Max: 15
|
28
|
+
|
29
|
+
Documentation:
|
30
|
+
Enabled: false
|
31
|
+
|
32
|
+
EachWithObject:
|
33
|
+
Enabled: false
|
34
|
+
|
35
|
+
IndentHash:
|
36
|
+
Enabled: false
|
37
|
+
|
38
|
+
IndentationConsistency:
|
39
|
+
Enabled: false
|
40
|
+
|
41
|
+
LineLength:
|
42
|
+
Max: 160
|
43
|
+
|
44
|
+
ParameterLists:
|
45
|
+
Max: 6
|
46
|
+
|
47
|
+
RegexpLiteral:
|
48
|
+
Enabled: false
|
49
|
+
|
50
|
+
SignalException:
|
51
|
+
Enabled: false
|
52
|
+
|
53
|
+
SpaceInsideHashLiteralBraces:
|
54
|
+
Enabled: false
|
55
|
+
|
56
|
+
StringLiterals:
|
57
|
+
Enabled: false
|
58
|
+
|
59
|
+
StringLiteralsInInterpolation:
|
60
|
+
Enabled: false
|
61
|
+
|
62
|
+
WordArray:
|
63
|
+
Enabled: false
|
data/.travis-gemfile
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
#
|
2
|
+
# This file is part of the pinterest-ruby gem. Copyright (C) 2017 and above Shogun <shogun@cowtech.it>.
|
3
|
+
# Licensed under the MIT license, which can be found at http://www.opensource.org/licenses/mit-license.php.
|
4
|
+
#
|
5
|
+
|
6
|
+
raise "Ruby version must be greater than 2.2.0" unless RUBY_VERSION.to_f >= 2.2
|
7
|
+
|
8
|
+
source "https://rubygems.org"
|
9
|
+
gemspec
|
10
|
+
|
11
|
+
# Testing
|
12
|
+
gem "rspec", "~> 3.5.0"
|
13
|
+
gem "rake", "~> 12.0"
|
14
|
+
gem "webmock", "~> 2.3"
|
15
|
+
gem "vcr", "~> 3.0"
|
16
|
+
gem "simplecov", ">= 0.12"
|
17
|
+
gem "coveralls", ">= 0.8", require: false
|
data/.travis.yml
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
#
|
2
|
+
# This file is part of the pinterest-ruby gem. Copyright (C) 2017 and above Shogun <shogun@cowtech.it>.
|
3
|
+
# Licensed under the MIT license, which can be found at http://www.opensource.org/licenses/mit-license.php.
|
4
|
+
#
|
5
|
+
|
6
|
+
language: ruby
|
7
|
+
rvm:
|
8
|
+
- 2.2.0
|
9
|
+
script: bundle exec rake spec:ci
|
10
|
+
gemfile: .travis-gemfile
|
11
|
+
notifications:
|
12
|
+
email: false
|
data/.yardopts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
-o ./docs -m markdown
|
data/CHANGELOG.md
ADDED
data/Gemfile
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
#
|
2
|
+
# This file is part of the pinterest-ruby gem. Copyright (C) 2017 and above Shogun <shogun@cowtech.it>.
|
3
|
+
# Licensed under the MIT license, which can be found at http://www.opensource.org/licenses/mit-license.php.
|
4
|
+
#
|
5
|
+
|
6
|
+
raise "Ruby version must be greater than 2.2.0" unless RUBY_VERSION.to_f >= 2.2
|
7
|
+
|
8
|
+
source "https://rubygems.org"
|
9
|
+
gemspec
|
10
|
+
|
11
|
+
# Testing
|
12
|
+
gem "rspec", "~> 3.5.0"
|
13
|
+
gem "rake", "~> 12.0"
|
14
|
+
gem "webmock", "~> 2.3"
|
15
|
+
gem "vcr", "~> 3.0"
|
16
|
+
|
17
|
+
# Documentation
|
18
|
+
gem "simplecov", ">= 0.12"
|
19
|
+
gem "coveralls", ">= 0.8", require: false
|
20
|
+
gem "pry", ">= 0.10"
|
21
|
+
gem "yard", ">= 0.9"
|
22
|
+
gem "kramdown", ">= 1.13"
|
23
|
+
gem "github-markup", ">= 1.4"
|
24
|
+
gem "rubocop", "~> 0.36"
|
data/README.md
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
# pinterest-ruby
|
2
|
+
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/pinterest-ruby.png)](http://badge.fury.io/rb/pinterest-ruby)
|
4
|
+
[![Dependency Status](https://gemnasium.com/ShogunPanda/pinterest-ruby.png?travis)](https://gemnasium.com/ShogunPanda/pinterest-ruby)
|
5
|
+
[![Build Status](https://secure.travis-ci.org/ShogunPanda/pinterest-ruby.png?branch=master)](http://travis-ci.org/ShogunPanda/pinterest-ruby)
|
6
|
+
[![Coverage Status](https://coveralls.io/repos/github/ShogunPanda/pinterest-ruby/badge.svg?branch=master)](https://coveralls.io/github/ShogunPanda/pinterest-ruby?branch=master)
|
7
|
+
|
8
|
+
A tiny JSON API framework for Ruby on Rails.
|
9
|
+
|
10
|
+
https://sw.cowtech.it/pinterest-ruby
|
11
|
+
|
12
|
+
# Introduction
|
13
|
+
|
14
|
+
Pinterest API wrapper.
|
15
|
+
|
16
|
+
## API Documentation
|
17
|
+
|
18
|
+
The API documentation can be found [here](https://sw.cowtech.it/pinterest-ruby/docs).
|
19
|
+
|
20
|
+
## Contributing to pinterest-ruby
|
21
|
+
|
22
|
+
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
|
23
|
+
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
|
24
|
+
* Fork the project.
|
25
|
+
* Start a feature/bugfix branch.
|
26
|
+
* Commit and push until you are happy with your contribution.
|
27
|
+
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
28
|
+
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
|
29
|
+
|
30
|
+
## Copyright
|
31
|
+
|
32
|
+
Copyright (C) 2017 and above Shogun <shogun@cowtech.it>.
|
33
|
+
|
34
|
+
Licensed under the MIT license, which can be found at http://opensource.org/licenses/MIT.
|
data/Rakefile
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
#
|
2
|
+
# This file is part of the pinterest-ruby gem. Copyright (C) 2017 and above Shogun <shogun@cowtech.it>.
|
3
|
+
# Licensed under the MIT license, which can be found at http://www.opensource.org/licenses/mit-license.php.
|
4
|
+
#
|
5
|
+
|
6
|
+
require "bundler/gem_tasks"
|
7
|
+
require "rspec/core/rake_task"
|
8
|
+
|
9
|
+
# Compatibility layer for Rake 11.0
|
10
|
+
Rake.application.class.send(:alias_method, :last_comment, :last_description) unless Rake.application.respond_to?(:last_comment)
|
11
|
+
|
12
|
+
RSpec::Core::RakeTask.new("spec")
|
13
|
+
|
14
|
+
RSpec::Core::RakeTask.new("spec:coverage") do
|
15
|
+
ENV["COVERAGE"] = "true"
|
16
|
+
end
|
17
|
+
|
18
|
+
RSpec::Core::RakeTask.new("spec:ci") do
|
19
|
+
ENV["COVERAGE"] = "true"
|
20
|
+
ENV["NO_COLOR"] = "true"
|
21
|
+
end
|
22
|
+
|
23
|
+
desc "Performs linting of the code using rubocop"
|
24
|
+
task "lint" do
|
25
|
+
Kernel.exec("rubocop -ED lib")
|
26
|
+
end
|
27
|
+
|
28
|
+
desc "Generate the documentation"
|
29
|
+
task :docs do
|
30
|
+
system("yardoc") || raise("Failed Execution of: yardoc")
|
31
|
+
end
|
32
|
+
|
33
|
+
desc "Get the current release version"
|
34
|
+
task :version, :with_name do |_, args|
|
35
|
+
gem = Bundler::GemHelper.instance.gemspec
|
36
|
+
puts [args[:with_name] == "true" ? gem.name : nil, gem.version].compact.join("-")
|
37
|
+
end
|
38
|
+
|
39
|
+
desc "Prepare the release"
|
40
|
+
task prerelease: ["spec:coverage", "docs"] do
|
41
|
+
["git add -A", "git commit -am \"Version #{Bundler::GemHelper.instance.gemspec.version}\""].each do |cmd|
|
42
|
+
system(cmd) || raise("Failed Execution of: #{cmd}")
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,218 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
+
<title>
|
7
|
+
Class: FaradayMiddleware::SafeOj
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.7
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
pathId = "FaradayMiddleware::SafeOj";
|
19
|
+
relpath = '../';
|
20
|
+
</script>
|
21
|
+
|
22
|
+
|
23
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
24
|
+
|
25
|
+
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
26
|
+
|
27
|
+
|
28
|
+
</head>
|
29
|
+
<body>
|
30
|
+
<div class="nav_wrap">
|
31
|
+
<iframe id="nav" src="../class_list.html?1"></iframe>
|
32
|
+
<div id="resizer"></div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="main" tabindex="-1">
|
36
|
+
<div id="header">
|
37
|
+
<div id="menu">
|
38
|
+
|
39
|
+
<a href="../_index.html">Index (S)</a> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../FaradayMiddleware.html" title="FaradayMiddleware (module)">FaradayMiddleware</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">SafeOj</span>
|
43
|
+
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div id="search">
|
47
|
+
|
48
|
+
<a class="full_list_link" id="class_list_link"
|
49
|
+
href="../class_list.html">
|
50
|
+
|
51
|
+
<svg width="24" height="24">
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
+
</svg>
|
56
|
+
</a>
|
57
|
+
|
58
|
+
</div>
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<div id="content"><h1>Class: FaradayMiddleware::SafeOj
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
<dl>
|
70
|
+
<dt>Inherits:</dt>
|
71
|
+
<dd>
|
72
|
+
<span class="inheritName">ResponseMiddleware</span>
|
73
|
+
|
74
|
+
<ul class="fullTree">
|
75
|
+
<li>Object</li>
|
76
|
+
|
77
|
+
<li class="next">ResponseMiddleware</li>
|
78
|
+
|
79
|
+
<li class="next">FaradayMiddleware::SafeOj</li>
|
80
|
+
|
81
|
+
</ul>
|
82
|
+
<a href="#" class="inheritanceTree">show all</a>
|
83
|
+
|
84
|
+
</dd>
|
85
|
+
</dl>
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
<dl>
|
98
|
+
<dt>Defined in:</dt>
|
99
|
+
<dd>lib/pinterest/safe_oj.rb</dd>
|
100
|
+
</dl>
|
101
|
+
|
102
|
+
</div>
|
103
|
+
|
104
|
+
<h2>Overview</h2><div class="docstring">
|
105
|
+
<div class="discussion">
|
106
|
+
<p>:nodoc:</p>
|
107
|
+
|
108
|
+
|
109
|
+
</div>
|
110
|
+
</div>
|
111
|
+
<div class="tags">
|
112
|
+
|
113
|
+
|
114
|
+
</div>
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
<h2>
|
123
|
+
Instance Method Summary
|
124
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
125
|
+
</h2>
|
126
|
+
|
127
|
+
<ul class="summary">
|
128
|
+
|
129
|
+
<li class="public ">
|
130
|
+
<span class="summary_signature">
|
131
|
+
|
132
|
+
<a href="#process_response-instance_method" title="#process_response (instance method)">#<strong>process_response</strong>(env) ⇒ Object </a>
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
</span>
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
<span class="summary_desc"><div class='inline'><p>:nodoc:.</p>
|
147
|
+
</div></span>
|
148
|
+
|
149
|
+
</li>
|
150
|
+
|
151
|
+
|
152
|
+
</ul>
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
<div id="instance_method_details" class="method_details_list">
|
159
|
+
<h2>Instance Method Details</h2>
|
160
|
+
|
161
|
+
|
162
|
+
<div class="method_details first">
|
163
|
+
<h3 class="signature first" id="process_response-instance_method">
|
164
|
+
|
165
|
+
#<strong>process_response</strong>(env) ⇒ <tt>Object</tt>
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
</h3><div class="docstring">
|
172
|
+
<div class="discussion">
|
173
|
+
<p>:nodoc:</p>
|
174
|
+
|
175
|
+
|
176
|
+
</div>
|
177
|
+
</div>
|
178
|
+
<div class="tags">
|
179
|
+
|
180
|
+
|
181
|
+
</div><table class="source_code">
|
182
|
+
<tr>
|
183
|
+
<td>
|
184
|
+
<pre class="lines">
|
185
|
+
|
186
|
+
|
187
|
+
17
|
188
|
+
18
|
189
|
+
19
|
190
|
+
20
|
191
|
+
21</pre>
|
192
|
+
</td>
|
193
|
+
<td>
|
194
|
+
<pre class="code"><span class="info file"># File 'lib/pinterest/safe_oj.rb', line 17</span>
|
195
|
+
|
196
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_process_response'>process_response</span><span class='lparen'>(</span><span class='id identifier rubyid_env'>env</span><span class='rparen'>)</span>
|
197
|
+
<span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_env'>env</span><span class='rparen'>)</span>
|
198
|
+
<span class='kw'>rescue</span> <span class='const'>Faraday</span><span class='op'>::</span><span class='const'>Error</span><span class='op'>::</span><span class='const'>ParsingError</span> <span class='op'>=></span> <span class='id identifier rubyid_err'>err</span>
|
199
|
+
<span class='id identifier rubyid_raise'>raise</span><span class='lparen'>(</span><span class='const'>Faraday</span><span class='op'>::</span><span class='const'>Error</span><span class='op'>::</span><span class='const'>ParsingError</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_err'>err</span><span class='period'>.</span><span class='id identifier rubyid_instance_variable_get'>instance_variable_get</span><span class='lparen'>(</span><span class='symbol'>:@wrapped_exception</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_env'>env</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
200
|
+
<span class='kw'>end</span></pre>
|
201
|
+
</td>
|
202
|
+
</tr>
|
203
|
+
</table>
|
204
|
+
</div>
|
205
|
+
|
206
|
+
</div>
|
207
|
+
|
208
|
+
</div>
|
209
|
+
|
210
|
+
<div id="footer">
|
211
|
+
Generated on Thu Jan 12 16:28:12 2017 by
|
212
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
213
|
+
0.9.7 (ruby-2.3.0).
|
214
|
+
</div>
|
215
|
+
|
216
|
+
</div>
|
217
|
+
</body>
|
218
|
+
</html>
|
@@ -0,0 +1,125 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
+
<title>
|
7
|
+
Module: FaradayMiddleware
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.7
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
pathId = "FaradayMiddleware";
|
19
|
+
relpath = '';
|
20
|
+
</script>
|
21
|
+
|
22
|
+
|
23
|
+
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
24
|
+
|
25
|
+
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
26
|
+
|
27
|
+
|
28
|
+
</head>
|
29
|
+
<body>
|
30
|
+
<div class="nav_wrap">
|
31
|
+
<iframe id="nav" src="class_list.html?1"></iframe>
|
32
|
+
<div id="resizer"></div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="main" tabindex="-1">
|
36
|
+
<div id="header">
|
37
|
+
<div id="menu">
|
38
|
+
|
39
|
+
<a href="_index.html">Index (F)</a> »
|
40
|
+
|
41
|
+
|
42
|
+
<span class="title">FaradayMiddleware</span>
|
43
|
+
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div id="search">
|
47
|
+
|
48
|
+
<a class="full_list_link" id="class_list_link"
|
49
|
+
href="class_list.html">
|
50
|
+
|
51
|
+
<svg width="24" height="24">
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
+
</svg>
|
56
|
+
</a>
|
57
|
+
|
58
|
+
</div>
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<div id="content"><h1>Module: FaradayMiddleware
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<dl>
|
80
|
+
<dt>Defined in:</dt>
|
81
|
+
<dd>lib/pinterest/safe_oj.rb</dd>
|
82
|
+
</dl>
|
83
|
+
|
84
|
+
</div>
|
85
|
+
|
86
|
+
<h2>Overview</h2><div class="docstring">
|
87
|
+
<div class="discussion">
|
88
|
+
<p>:nodoc:</p>
|
89
|
+
|
90
|
+
|
91
|
+
</div>
|
92
|
+
</div>
|
93
|
+
<div class="tags">
|
94
|
+
|
95
|
+
|
96
|
+
</div><h2>Defined Under Namespace</h2>
|
97
|
+
<p class="children">
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
<strong class="classes">Classes:</strong> <span class='object_link'><a href="FaradayMiddleware/SafeOj.html" title="FaradayMiddleware::SafeOj (class)">SafeOj</a></span>
|
103
|
+
|
104
|
+
|
105
|
+
</p>
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
</div>
|
116
|
+
|
117
|
+
<div id="footer">
|
118
|
+
Generated on Thu Jan 12 16:28:12 2017 by
|
119
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
120
|
+
0.9.7 (ruby-2.3.0).
|
121
|
+
</div>
|
122
|
+
|
123
|
+
</div>
|
124
|
+
</body>
|
125
|
+
</html>
|