citygrid_api 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/.sass-cache/c6f2c767b164f077e5b9fb1f18a7886d7c755211/test.scssc +0 -0
- data/README.rdoc +42 -13
- data/Rakefile +2 -2
- data/VERSION +1 -1
- data/citygrid_api.gemspec +23 -12
- data/citygrid_api.yml.sample +10 -2
- data/citygrid_api.yml.sandbox +46 -0
- data/dashboard.rb +1 -1
- data/fixtures/vcr_cassettes/AdGroupCriterion_mutate.yml +3 -3
- data/fixtures/vcr_cassettes/AdGroupCriterion_search.yml +3 -3
- data/fixtures/vcr_cassettes/Adding_a_place.yml +4 -4
- data/fixtures/vcr_cassettes/Geo.yml +30 -13
- data/fixtures/vcr_cassettes/Getting_an_offer.yml +413 -0
- data/fixtures/vcr_cassettes/Getting_an_offer_by_listing_ID.yml +12 -12
- data/fixtures/vcr_cassettes/Import_a_cg_account.yml +28 -16
- data/fixtures/vcr_cassettes/Initiating_a_Details.yml +14 -30
- data/fixtures/vcr_cassettes/Initiating_new_MultiDetails.yml +13 -13
- data/fixtures/vcr_cassettes/Mutating_AdGroup_Ads.yml +4 -4
- data/fixtures/vcr_cassettes/Report_summary_daily.yml +34 -34
- data/fixtures/vcr_cassettes/Report_summary_user_actions.yml +14 -10
- data/fixtures/vcr_cassettes/Search_Ad_Group_by_Campaign_Id.yml +3 -3
- data/fixtures/vcr_cassettes/Search_Billing_by_Campaign_Id.yml +31 -12
- data/fixtures/vcr_cassettes/Search_account_manager_by_Campaign_Id.yml +25 -12
- data/fixtures/vcr_cassettes/Searching_AdGroup_Geo.yml +6 -6
- data/fixtures/vcr_cassettes/Searching_budgets.yml +31 -12
- data/fixtures/vcr_cassettes/Searching_categories_by_listing_id.yml +3 -3
- data/fixtures/vcr_cassettes/Searching_categories_by_query.yml +3 -3
- data/fixtures/vcr_cassettes/Upload_an_image_Add_a_preview.yml +31 -12
- data/fixtures/vcr_cassettes/{Method_of_Payment_mutate.yml → create_a_mop.yml} +24 -12
- data/fixtures/vcr_cassettes/create_an_offer.yml +51 -0
- data/fixtures/vcr_cassettes/create_campaign.yml +5 -5
- data/fixtures/vcr_cassettes/create_campaign_then_create_ad_group_belonging_to_campaign.yml +61 -0
- data/fixtures/vcr_cassettes/create_campaign_then_create_ad_group_belonging_to_campaign_then_search_.yml +91 -0
- data/fixtures/vcr_cassettes/getting_reviews_by_listing_id.yml +91 -0
- data/fixtures/vcr_cassettes/log_in_a_session.yml +3 -3
- data/fixtures/vcr_cassettes/log_in_a_session_mutate_places.yml +7 -7
- data/fixtures/vcr_cassettes/query_account_type_by_id.yml +24 -12
- data/fixtures/vcr_cassettes/search_for_an_account_by_id.yml +24 -13
- data/fixtures/vcr_cassettes/search_for_an_account_by_name.yml +27 -17
- data/fixtures/vcr_cassettes/search_for_call_detail_by_campaign.yml +49 -0
- data/fixtures/vcr_cassettes/search_for_mop_by_account_id.yml +65 -0
- data/fixtures/vcr_cassettes/searching_for_a_CityGrid_listing.yml +57 -53
- data/fixtures/vcr_cassettes/searching_for_a_special_CityGrid_listing.yml +10 -10
- data/fixtures/vcr_cassettes/user_log_in_with_raw_API.yml +24 -0
- data/fixtures/vcr_cassettes/user_log_in_with_session.yml +24 -0
- data/lib/citygrid/api/accounts/account.rb +2 -2
- data/lib/citygrid/api/accounts/method_of_payment.rb +2 -2
- data/lib/citygrid/api/accounts/user.rb +8 -4
- data/lib/citygrid/api/advertising/account_manager.rb +1 -1
- data/lib/citygrid/api/advertising/ad_group.rb +2 -2
- data/lib/citygrid/api/advertising/ad_group_ad.rb +2 -2
- data/lib/citygrid/api/advertising/ad_group_criterion.rb +2 -2
- data/lib/citygrid/api/advertising/ad_group_geo.rb +2 -2
- data/lib/citygrid/api/advertising/billing.rb +2 -1
- data/lib/citygrid/api/advertising/budget.rb +2 -2
- data/lib/citygrid/api/advertising/call_detail.rb +2 -2
- data/lib/citygrid/api/advertising/campaign.rb +2 -2
- data/lib/citygrid/api/advertising/category.rb +2 -2
- data/lib/citygrid/api/advertising/geolocation.rb +2 -2
- data/lib/citygrid/api/advertising/image.rb +3 -3
- data/lib/citygrid/api/advertising/offers.rb +10 -0
- data/lib/citygrid/api/advertising/places.rb +2 -2
- data/lib/citygrid/api/content/offers.rb +11 -2
- data/lib/citygrid/api/content/places.rb +1 -1
- data/lib/citygrid/api/content/response.rb +14 -0
- data/lib/citygrid/api/content/reviews.rb +5 -2
- data/lib/citygrid/api/mutable.rb +13 -0
- data/lib/citygrid/api/searchable.rb +4 -6
- data/lib/citygrid/api.rb +70 -52
- data/lib/citygrid/session.rb +5 -9
- data/lib/citygrid.rb +28 -1
- data/test/api/accounts/test_account.rb +53 -32
- data/test/api/accounts/test_method_of_payment.rb +40 -43
- data/test/api/accounts/test_user.rb +16 -0
- data/test/api/advertising/test_call_detail.rb +17 -2
- data/test/api/advertising/test_offers.rb +33 -0
- data/test/api/advertising/test_places.rb +18 -0
- data/test/api/content/test_offers.rb +14 -14
- data/test/api/content/test_response.rb +51 -0
- data/test/api/content/test_reviews.rb +11 -0
- data/test/helper.rb +18 -11
- metadata +41 -29
- data/README +0 -21
- data/citygrid_api.yml.backup +0 -35
- data/fixtures/vcr_cassettes/Call_Detail_by_campaign.yml +0 -79
- data/fixtures/vcr_cassettes/Method_of_Payment_search.yml +0 -59
- data/lib/citygrid/api/mutatable.rb +0 -15
Binary file
|
data/README.rdoc
CHANGED
@@ -1,21 +1,50 @@
|
|
1
1
|
= citygrid
|
2
2
|
|
3
|
-
|
3
|
+
Not stable yet. Use at your own risk!
|
4
4
|
|
5
|
-
|
5
|
+
== Getting Started
|
6
6
|
|
7
|
-
|
7
|
+
=== Installation
|
8
8
|
|
9
|
-
|
10
|
-
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
|
11
|
-
* Fork the project
|
12
|
-
* Start a feature/bugfix branch
|
13
|
-
* Commit and push until you are happy with your contribution
|
14
|
-
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
15
|
-
* 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.
|
9
|
+
This gem is still under very active development. As such, you can obtain the latest by directly installing from github:
|
16
10
|
|
17
|
-
|
11
|
+
gem "citygrid_api", :git => "git://github.com/CityGrid/citygrid_api.git"
|
18
12
|
|
19
|
-
|
20
|
-
further details.
|
13
|
+
You can get a relatively stable build from rubygems.org. Specifying a version number is highly recommended as there will be breaking changes until we stabilize.
|
21
14
|
|
15
|
+
gem "citygrid_api", "0.0.6"
|
16
|
+
|
17
|
+
=== Configuration
|
18
|
+
|
19
|
+
Add a file called citygrid_api.rb under config/initializers.
|
20
|
+
|
21
|
+
Configure the gem to use your publisher code with:
|
22
|
+
|
23
|
+
CityGrid.publisher = 'your_publisher_code'
|
24
|
+
|
25
|
+
If you don't have a publisher code, you can obtain one at http://developer.citygridmedia.com
|
26
|
+
|
27
|
+
Move citygrid_api.yml.sample into your project. This file configures the API endpoints. Load the configuration with:
|
28
|
+
|
29
|
+
CityGrid.load_config 'path/to/config/yml'
|
30
|
+
|
31
|
+
== Sessions
|
32
|
+
|
33
|
+
Most methods require an AuthToken. This is obtained by either using the CityGrid::Session class (preferred) or CityGrid::API::Accounts::Account.login, which would require managing your own AuthToken.
|
34
|
+
|
35
|
+
An authenticated session can be obtained with
|
36
|
+
|
37
|
+
session = CityGrid.session 'username', 'password'
|
38
|
+
|
39
|
+
Once authenticated, the session will automatically pass along the AuthToken to API methods that require it when you use the call_api method
|
40
|
+
|
41
|
+
session.call_api CityGrid::API::Advertising::Category,
|
42
|
+
:search,
|
43
|
+
:keywords => "pizza"
|
44
|
+
|
45
|
+
This corresponds to
|
46
|
+
|
47
|
+
auth_token = 'my_auth_token' # obtained by calling CityGrid::API::Accounts::Account.login
|
48
|
+
CityGrid::API::Advertising::Category.search :token => auth_token, :keywords => "pizza"
|
49
|
+
|
50
|
+
In the future, AuthTokens may be invalidated and there may be other methods to log in. Session and call_api will handle that for you.
|
data/Rakefile
CHANGED
@@ -19,8 +19,8 @@ Jeweler::Tasks.new do |gem|
|
|
19
19
|
gem.license = "MIT"
|
20
20
|
gem.summary = %Q{Ruby wrapper for CityGrid APIs}
|
21
21
|
gem.description = %Q{Ruby wrapper for CityGrid APIs}
|
22
|
-
gem.email = "
|
23
|
-
gem.authors = ["Elpizo Choi"]
|
22
|
+
gem.email = "Joseph.Chen@citygridmedia.com"
|
23
|
+
gem.authors = ["Elpizo Choi", "Joseph Chen"]
|
24
24
|
# dependencies defined in Gemfile
|
25
25
|
end
|
26
26
|
Jeweler::RubygemsDotOrgTasks.new
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.7
|
data/citygrid_api.gemspec
CHANGED
@@ -5,16 +5,15 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "citygrid_api"
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.7"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
-
s.authors = ["Elpizo Choi"]
|
12
|
-
s.date = "
|
11
|
+
s.authors = ["Elpizo Choi", "Joseph Chen"]
|
12
|
+
s.date = "2012-02-27"
|
13
13
|
s.description = "Ruby wrapper for CityGrid APIs"
|
14
|
-
s.email = "
|
14
|
+
s.email = "Joseph.Chen@citygridmedia.com"
|
15
15
|
s.extra_rdoc_files = [
|
16
16
|
"LICENSE.txt",
|
17
|
-
"README",
|
18
17
|
"README.rdoc"
|
19
18
|
]
|
20
19
|
s.files = [
|
@@ -24,26 +23,23 @@ Gem::Specification.new do |s|
|
|
24
23
|
"Gemfile",
|
25
24
|
"Gemfile.lock",
|
26
25
|
"LICENSE.txt",
|
27
|
-
"README",
|
28
26
|
"README.rdoc",
|
29
27
|
"Rakefile",
|
30
28
|
"VERSION",
|
31
29
|
"citygrid_api.gemspec",
|
32
|
-
"citygrid_api.yml.backup",
|
33
30
|
"citygrid_api.yml.sample",
|
31
|
+
"citygrid_api.yml.sandbox",
|
34
32
|
"config.ru",
|
35
33
|
"dashboard.rb",
|
36
34
|
"fixtures/vcr_cassettes/AdGroupCriterion_mutate.yml",
|
37
35
|
"fixtures/vcr_cassettes/AdGroupCriterion_search.yml",
|
38
36
|
"fixtures/vcr_cassettes/Adding_a_place.yml",
|
39
|
-
"fixtures/vcr_cassettes/Call_Detail_by_campaign.yml",
|
40
37
|
"fixtures/vcr_cassettes/Geo.yml",
|
38
|
+
"fixtures/vcr_cassettes/Getting_an_offer.yml",
|
41
39
|
"fixtures/vcr_cassettes/Getting_an_offer_by_listing_ID.yml",
|
42
40
|
"fixtures/vcr_cassettes/Import_a_cg_account.yml",
|
43
41
|
"fixtures/vcr_cassettes/Initiating_a_Details.yml",
|
44
42
|
"fixtures/vcr_cassettes/Initiating_new_MultiDetails.yml",
|
45
|
-
"fixtures/vcr_cassettes/Method_of_Payment_mutate.yml",
|
46
|
-
"fixtures/vcr_cassettes/Method_of_Payment_search.yml",
|
47
43
|
"fixtures/vcr_cassettes/Mutating_AdGroup_Ads.yml",
|
48
44
|
"fixtures/vcr_cassettes/Report_summary_daily.yml",
|
49
45
|
"fixtures/vcr_cassettes/Report_summary_user_actions.yml",
|
@@ -55,14 +51,23 @@ Gem::Specification.new do |s|
|
|
55
51
|
"fixtures/vcr_cassettes/Searching_categories_by_listing_id.yml",
|
56
52
|
"fixtures/vcr_cassettes/Searching_categories_by_query.yml",
|
57
53
|
"fixtures/vcr_cassettes/Upload_an_image_Add_a_preview.yml",
|
54
|
+
"fixtures/vcr_cassettes/create_a_mop.yml",
|
55
|
+
"fixtures/vcr_cassettes/create_an_offer.yml",
|
58
56
|
"fixtures/vcr_cassettes/create_campaign.yml",
|
57
|
+
"fixtures/vcr_cassettes/create_campaign_then_create_ad_group_belonging_to_campaign.yml",
|
58
|
+
"fixtures/vcr_cassettes/create_campaign_then_create_ad_group_belonging_to_campaign_then_search_.yml",
|
59
|
+
"fixtures/vcr_cassettes/getting_reviews_by_listing_id.yml",
|
59
60
|
"fixtures/vcr_cassettes/log_in_a_session.yml",
|
60
61
|
"fixtures/vcr_cassettes/log_in_a_session_mutate_places.yml",
|
61
62
|
"fixtures/vcr_cassettes/query_account_type_by_id.yml",
|
62
63
|
"fixtures/vcr_cassettes/search_for_an_account_by_id.yml",
|
63
64
|
"fixtures/vcr_cassettes/search_for_an_account_by_name.yml",
|
65
|
+
"fixtures/vcr_cassettes/search_for_call_detail_by_campaign.yml",
|
66
|
+
"fixtures/vcr_cassettes/search_for_mop_by_account_id.yml",
|
64
67
|
"fixtures/vcr_cassettes/searching_for_a_CityGrid_listing.yml",
|
65
68
|
"fixtures/vcr_cassettes/searching_for_a_special_CityGrid_listing.yml",
|
69
|
+
"fixtures/vcr_cassettes/user_log_in_with_raw_API.yml",
|
70
|
+
"fixtures/vcr_cassettes/user_log_in_with_session.yml",
|
66
71
|
"lib/citygrid.rb",
|
67
72
|
"lib/citygrid/abstraction.rb",
|
68
73
|
"lib/citygrid/abstraction/collection.rb",
|
@@ -89,13 +94,15 @@ Gem::Specification.new do |s|
|
|
89
94
|
"lib/citygrid/api/advertising/category.rb",
|
90
95
|
"lib/citygrid/api/advertising/geolocation.rb",
|
91
96
|
"lib/citygrid/api/advertising/image.rb",
|
97
|
+
"lib/citygrid/api/advertising/offers.rb",
|
92
98
|
"lib/citygrid/api/advertising/performance.rb",
|
93
99
|
"lib/citygrid/api/advertising/places.rb",
|
94
100
|
"lib/citygrid/api/content.rb",
|
95
101
|
"lib/citygrid/api/content/offers.rb",
|
96
102
|
"lib/citygrid/api/content/places.rb",
|
103
|
+
"lib/citygrid/api/content/response.rb",
|
97
104
|
"lib/citygrid/api/content/reviews.rb",
|
98
|
-
"lib/citygrid/api/
|
105
|
+
"lib/citygrid/api/mutable.rb",
|
99
106
|
"lib/citygrid/api/response.rb",
|
100
107
|
"lib/citygrid/api/searchable.rb",
|
101
108
|
"lib/citygrid/details.rb",
|
@@ -113,6 +120,7 @@ Gem::Specification.new do |s|
|
|
113
120
|
"public/javascript/dashboard.js",
|
114
121
|
"test/api/accounts/test_account.rb",
|
115
122
|
"test/api/accounts/test_method_of_payment.rb",
|
123
|
+
"test/api/accounts/test_user.rb",
|
116
124
|
"test/api/advertising/test_account_manager.rb",
|
117
125
|
"test/api/advertising/test_ad_group.rb",
|
118
126
|
"test/api/advertising/test_ad_group_ad.rb",
|
@@ -125,10 +133,13 @@ Gem::Specification.new do |s|
|
|
125
133
|
"test/api/advertising/test_create_campaign_and_ad_group.rb",
|
126
134
|
"test/api/advertising/test_geolocation.rb",
|
127
135
|
"test/api/advertising/test_image.rb",
|
136
|
+
"test/api/advertising/test_offers.rb",
|
128
137
|
"test/api/advertising/test_performance.rb",
|
129
138
|
"test/api/advertising/test_places.rb",
|
130
139
|
"test/api/content/test_details.rb",
|
131
140
|
"test/api/content/test_offers.rb",
|
141
|
+
"test/api/content/test_response.rb",
|
142
|
+
"test/api/content/test_reviews.rb",
|
132
143
|
"test/api/content/test_search.rb",
|
133
144
|
"test/auth_token.rb",
|
134
145
|
"test/helper.rb",
|
@@ -149,7 +160,7 @@ Gem::Specification.new do |s|
|
|
149
160
|
]
|
150
161
|
s.licenses = ["MIT"]
|
151
162
|
s.require_paths = ["lib"]
|
152
|
-
s.rubygems_version = "1.8.
|
163
|
+
s.rubygems_version = "1.8.10"
|
153
164
|
s.summary = "Ruby wrapper for CityGrid APIs"
|
154
165
|
|
155
166
|
if s.respond_to? :specification_version then
|
data/citygrid_api.yml.sample
CHANGED
@@ -29,11 +29,14 @@ api:
|
|
29
29
|
ad_group_geo: advertising/adgroupgeo/v2
|
30
30
|
budget: advertising/budget/v2/recommend
|
31
31
|
billing: advertising/billing/v2
|
32
|
-
call_detail:
|
32
|
+
call_detail:
|
33
|
+
endpoint: report/calldetail/v2
|
34
|
+
hostname: lax1qatxpi4.test.cs:8080
|
33
35
|
campaign: advertising/campaign/v2
|
34
36
|
category: content/category/v2
|
35
37
|
geo_location: content/places/v2/geocode
|
36
38
|
image: advertising/image/v2
|
39
|
+
offers: advertising/offer/v2
|
37
40
|
places: content/places/v2
|
38
41
|
performance: advertising/performance/v2
|
39
42
|
content:
|
@@ -42,4 +45,9 @@ api:
|
|
42
45
|
hostname: api.citygridmedia.com
|
43
46
|
places:
|
44
47
|
endpoint: content/places/v2
|
45
|
-
hostname: api.citygridmedia.com
|
48
|
+
hostname: api.citygridmedia.com
|
49
|
+
reviews:
|
50
|
+
endpoint: content/reviews/v2
|
51
|
+
hostname: api.citygridmedia.com
|
52
|
+
response:
|
53
|
+
endpoint: content/reviews/v2/response
|
@@ -0,0 +1,46 @@
|
|
1
|
+
defaults:
|
2
|
+
hostname: sandbox-api.citygrid.com
|
3
|
+
ssl_hostname: sandbox-api.citygrid.com
|
4
|
+
|
5
|
+
# endpoint_name: endpoint
|
6
|
+
# OR
|
7
|
+
# endpoint_name:
|
8
|
+
# ssl: true/false
|
9
|
+
# endpoint: endpoint
|
10
|
+
|
11
|
+
api:
|
12
|
+
accounts:
|
13
|
+
account:
|
14
|
+
ssl: true
|
15
|
+
endpoint: accounts/account/v2
|
16
|
+
method_of_payment:
|
17
|
+
ssl: true
|
18
|
+
endpoint: accounts/mop/v2
|
19
|
+
user:
|
20
|
+
ssl: true
|
21
|
+
endpoint: accounts/user/v2
|
22
|
+
advertising:
|
23
|
+
account_manager:
|
24
|
+
ssl: true
|
25
|
+
endpoint: advertising/campaign/v2/accountmanager
|
26
|
+
ad_group: advertising/adgroup/v2
|
27
|
+
ad_group_ad: advertising/adgroupad/v2
|
28
|
+
ad_group_criterion: advertising/adgroupcriterion/v2
|
29
|
+
ad_group_geo: advertising/adgroupgeo/v2
|
30
|
+
budget: advertising/budget/v2/recommend
|
31
|
+
billing: advertising/billing/v2
|
32
|
+
call_detail: advertising/calldetail/v2
|
33
|
+
campaign: advertising/campaign/v2
|
34
|
+
category: content/category/v2
|
35
|
+
geo_location: content/places/v2/geocode
|
36
|
+
image: advertising/image/v2
|
37
|
+
offers: advertising/offer/v2
|
38
|
+
places: content/places/v2
|
39
|
+
performance: advertising/performance/v2
|
40
|
+
content:
|
41
|
+
offers:
|
42
|
+
endpoint: content/offers/v2
|
43
|
+
hostname: api.citygridmedia.com
|
44
|
+
places:
|
45
|
+
endpoint: content/places/v2
|
46
|
+
hostname: api.citygridmedia.com
|
data/dashboard.rb
CHANGED
@@ -64,7 +64,7 @@ get '/' do
|
|
64
64
|
Riot.alone!
|
65
65
|
|
66
66
|
# test_paths = Dir.glob "test/**/test_*.rb"
|
67
|
-
test_paths = Dir.glob("test
|
67
|
+
test_paths = Dir.glob("test/**/test_*.rb").sort
|
68
68
|
# test_paths = ["test/api/ad_center/test_account.rb"]
|
69
69
|
|
70
70
|
@results = []
|
@@ -2,7 +2,7 @@
|
|
2
2
|
- !ruby/struct:VCR::HTTPInteraction
|
3
3
|
request: !ruby/struct:VCR::Request
|
4
4
|
method: :post
|
5
|
-
uri: http://api.
|
5
|
+
uri: http://sandbox-api.citygrid.com:80/advertising/adgroupcriterion/v2/mutate
|
6
6
|
body: ! '{"mutateOperationListResource":[{"operator":"ADD","operand":{"adGroupId":"2","adGroupAdId":"1","adGroupCriterionId":"1722","type":"2"}},{"operator":"REMOVE","operand":{"adGroupId":"2","adGroupAdId":"1","adGroupCriterionId":"1722","type":"2"}}]}'
|
7
7
|
headers:
|
8
8
|
accept:
|
@@ -10,14 +10,14 @@
|
|
10
10
|
content-type:
|
11
11
|
- Application/JSON
|
12
12
|
authtoken:
|
13
|
-
-
|
13
|
+
- 20f1918ababef692f0b7e71940acbe4b
|
14
14
|
response: !ruby/struct:VCR::Response
|
15
15
|
status: !ruby/struct:VCR::ResponseStatus
|
16
16
|
code: 200
|
17
17
|
message: OK
|
18
18
|
headers:
|
19
19
|
date:
|
20
|
-
-
|
20
|
+
- Sat, 31 Dec 2011 01:12:36 GMT
|
21
21
|
server:
|
22
22
|
- Apache-Coyote/1.1
|
23
23
|
content-type:
|
@@ -2,7 +2,7 @@
|
|
2
2
|
- !ruby/struct:VCR::HTTPInteraction
|
3
3
|
request: !ruby/struct:VCR::Request
|
4
4
|
method: :get
|
5
|
-
uri: http://api.
|
5
|
+
uri: http://sandbox-api.citygrid.com:80/advertising/adgroupcriterion/v2/get?adGroupId=6
|
6
6
|
body: !!null
|
7
7
|
headers:
|
8
8
|
accept:
|
@@ -10,14 +10,14 @@
|
|
10
10
|
content-type:
|
11
11
|
- Application/JSON
|
12
12
|
authtoken:
|
13
|
-
-
|
13
|
+
- 20f1918ababef692f0b7e71940acbe4b
|
14
14
|
response: !ruby/struct:VCR::Response
|
15
15
|
status: !ruby/struct:VCR::ResponseStatus
|
16
16
|
code: 200
|
17
17
|
message: OK
|
18
18
|
headers:
|
19
19
|
date:
|
20
|
-
-
|
20
|
+
- Sat, 31 Dec 2011 01:12:34 GMT
|
21
21
|
server:
|
22
22
|
- Apache-Coyote/1.1
|
23
23
|
content-type:
|
@@ -2,7 +2,7 @@
|
|
2
2
|
- !ruby/struct:VCR::HTTPInteraction
|
3
3
|
request: !ruby/struct:VCR::Request
|
4
4
|
method: :post
|
5
|
-
uri: http://api.
|
5
|
+
uri: http://sandbox-api.citygrid.com:80/content/places/v2/mutate
|
6
6
|
body: ! '{"mutateOperationListResource":[{"operator":"ADD","operand":{"name":"Pi
|
7
7
|
on sunset in LAAAAAAAAAAAAAA","address_1":"Jackson 2102","address_2":"","city":"Los
|
8
8
|
Angeles","state":"California","postal_code":90025,"phone_number":3103333333,"website_url":"pi.com","primary_tag_id":3623,"bullet1":"Knoll
|
@@ -13,14 +13,14 @@
|
|
13
13
|
content-type:
|
14
14
|
- Application/JSON
|
15
15
|
authtoken:
|
16
|
-
-
|
16
|
+
- 2f45061f07f7e61a9f3953d7bfbd904b
|
17
17
|
response: !ruby/struct:VCR::Response
|
18
18
|
status: !ruby/struct:VCR::ResponseStatus
|
19
19
|
code: 200
|
20
20
|
message: OK
|
21
21
|
headers:
|
22
22
|
date:
|
23
|
-
-
|
23
|
+
- Sat, 31 Dec 2011 01:13:18 GMT
|
24
24
|
server:
|
25
25
|
- Apache-Coyote/1.1
|
26
26
|
content-type:
|
@@ -29,5 +29,5 @@
|
|
29
29
|
- Accept-Encoding
|
30
30
|
transfer-encoding:
|
31
31
|
- chunked
|
32
|
-
body: ! '{"resources":[{"response":{"message":"OK","code":200},"listingId":
|
32
|
+
body: ! '{"resources":[{"response":{"message":"OK","code":200},"listingId":904202230}]}'
|
33
33
|
http_version: '1.1'
|
@@ -2,7 +2,7 @@
|
|
2
2
|
- !ruby/struct:VCR::HTTPInteraction
|
3
3
|
request: !ruby/struct:VCR::Request
|
4
4
|
method: :get
|
5
|
-
uri: http://api.
|
5
|
+
uri: http://sandbox-api.citygrid.com:80/content/places/v2/geocode/get?city=seattle&state=wa&streetAddress=720%203rd%20ave&zipCode=98007
|
6
6
|
body: !!null
|
7
7
|
headers:
|
8
8
|
accept:
|
@@ -13,20 +13,37 @@
|
|
13
13
|
- ''
|
14
14
|
response: !ruby/struct:VCR::Response
|
15
15
|
status: !ruby/struct:VCR::ResponseStatus
|
16
|
-
code:
|
17
|
-
message:
|
16
|
+
code: 403
|
17
|
+
message: Forbidden
|
18
18
|
headers:
|
19
19
|
date:
|
20
|
-
-
|
20
|
+
- Sat, 31 Dec 2011 01:13:14 GMT
|
21
21
|
server:
|
22
|
-
- Apache
|
22
|
+
- Apache/2.2.4 (Unix) mod_perl/2.0.5 Perl/v5.8.5
|
23
|
+
content-length:
|
24
|
+
- '345'
|
23
25
|
content-type:
|
24
|
-
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
26
|
+
- text/html; charset=iso-8859-1
|
27
|
+
body: ! '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
|
28
|
+
|
29
|
+
<html><head>
|
30
|
+
|
31
|
+
<title>403 Forbidden</title>
|
32
|
+
|
33
|
+
</head><body>
|
34
|
+
|
35
|
+
<h1>Forbidden</h1>
|
36
|
+
|
37
|
+
<p>You don''t have permission to access /content/places/v2/geocode/get
|
38
|
+
|
39
|
+
on this server.</p>
|
40
|
+
|
41
|
+
<hr>
|
42
|
+
|
43
|
+
<address>Apache/2.2.4 (Unix) mod_perl/2.0.5 Perl/v5.8.5 Server at sandbox-api.citygrid.com
|
44
|
+
Port 80</address>
|
45
|
+
|
46
|
+
</body></html>
|
47
|
+
|
48
|
+
'
|
32
49
|
http_version: '1.1'
|