baidu_lbs 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +14 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE.txt +22 -0
  5. data/README.md +31 -0
  6. data/Rakefile +9 -0
  7. data/baidu_lbs.gemspec +30 -0
  8. data/lib/baidu_lbs/client.rb +7 -0
  9. data/lib/baidu_lbs/configurable.rb +17 -0
  10. data/lib/baidu_lbs/geo_data/column.rb +25 -0
  11. data/lib/baidu_lbs/geo_data/geotable.rb +31 -0
  12. data/lib/baidu_lbs/geo_data/job.rb +13 -0
  13. data/lib/baidu_lbs/geo_data/poi.rb +30 -0
  14. data/lib/baidu_lbs/geo_search.rb +20 -0
  15. data/lib/baidu_lbs/request.rb +39 -0
  16. data/lib/baidu_lbs/version.rb +3 -0
  17. data/lib/baidu_lbs.rb +13 -0
  18. data/test/baidu_lbs/geodata/column_test.rb +49 -0
  19. data/test/baidu_lbs/geodata/geotable_test.rb +44 -0
  20. data/test/baidu_lbs/geodata/job_test.rb +19 -0
  21. data/test/baidu_lbs/geodata/poi_test.rb +54 -0
  22. data/test/baidu_lbs/version_test.rb +8 -0
  23. data/test/fixtures/poi_list.csv +1 -0
  24. data/test/fixtures/vcr_cassettes/geo_search_test.rb +5 -0
  25. data/test/fixtures/vcr_cassettes/geodata/column/create.yml +51 -0
  26. data/test/fixtures/vcr_cassettes/geodata/column/delete.yml +51 -0
  27. data/test/fixtures/vcr_cassettes/geodata/column/detail.yml +50 -0
  28. data/test/fixtures/vcr_cassettes/geodata/column/list.yml +50 -0
  29. data/test/fixtures/vcr_cassettes/geodata/column/update.yml +51 -0
  30. data/test/fixtures/vcr_cassettes/geodata/geotable/create.yml +51 -0
  31. data/test/fixtures/vcr_cassettes/geodata/geotable/delete.yml +51 -0
  32. data/test/fixtures/vcr_cassettes/geodata/geotable/detail.yml +50 -0
  33. data/test/fixtures/vcr_cassettes/geodata/geotable/list.yml +50 -0
  34. data/test/fixtures/vcr_cassettes/geodata/geotable/update.yml +51 -0
  35. data/test/fixtures/vcr_cassettes/geodata/job/detail.yml +49 -0
  36. data/test/fixtures/vcr_cassettes/geodata/job/list.yml +56 -0
  37. data/test/fixtures/vcr_cassettes/geodata/poi/create.yml +51 -0
  38. data/test/fixtures/vcr_cassettes/geodata/poi/delete.yml +50 -0
  39. data/test/fixtures/vcr_cassettes/geodata/poi/detail.yml +50 -0
  40. data/test/fixtures/vcr_cassettes/geodata/poi/list.yml +52 -0
  41. data/test/fixtures/vcr_cassettes/geodata/poi/update.yml +51 -0
  42. data/test/fixtures/vcr_cassettes/geodata/poi/upload.yml +65 -0
  43. data/test/test_helper.rb +15 -0
  44. metadata +210 -0
@@ -0,0 +1,50 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://api.map.baidu.com/geodata/v3/column/list?ak=KmMATCZL0fakL8XkCWZsuS0K&geotable_id=78835
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v0.9.0
12
+ Accept-Encoding:
13
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
+ Accept:
15
+ - "*/*"
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Http-X-Bd-Logid:
22
+ - '23264924'
23
+ Http-X-Bd-Logid64:
24
+ - '94270130287929733'
25
+ Http-X-Bd-Product:
26
+ - map
27
+ Http-X-Bd-Subsys:
28
+ - apimap
29
+ Set-Cookie:
30
+ - BAIDUID=D015B488B3B53F3379B4341F122D712D:FG=1; max-age=31536000; expires=Sat,
31
+ 19-Sep-15 16:26:31 GMT; domain=.baidu.com; path=/; version=1
32
+ P3p:
33
+ - CP=" OTI DSP COR IVA OUR IND COM "
34
+ Content-Type:
35
+ - text/javascript; charset=UTF-8
36
+ Vary:
37
+ - Accept-Encoding
38
+ Transfer-Encoding:
39
+ - chunked
40
+ Date:
41
+ - Fri, 19 Sep 2014 16:26:31 GMT
42
+ Server:
43
+ - apache
44
+ body:
45
+ encoding: UTF-8
46
+ string: '{"status":0,"size":1,"columns":[{"key":"awesome_column","type":1,"geotable_id":78835,"name":"awesome_column","is_sortfilter_field":1,"sortfilter_id":1,"is_search_field":0,"is_index_field":1,"is_unique_field":0,"create_time":"2014-09-20
47
+ 00:26:26","modify_time":"2014-09-20 00:26:26","id":77316}],"message":"\u6210\u529f"}'
48
+ http_version:
49
+ recorded_at: Fri, 19 Sep 2014 16:26:32 GMT
50
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,51 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://api.map.baidu.com/geodata/v3/column/update
6
+ body:
7
+ encoding: UTF-8
8
+ string: ak=KmMATCZL0fakL8XkCWZsuS0K&geotable_id=78835&id=77316&name=cool_column
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v0.9.0
12
+ Content-Type:
13
+ - application/x-www-form-urlencoded
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ Accept:
17
+ - "*/*"
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Http-X-Bd-Logid:
24
+ - '3536722600'
25
+ Http-X-Bd-Logid64:
26
+ - '16529011152984190353'
27
+ Http-X-Bd-Product:
28
+ - map
29
+ Http-X-Bd-Subsys:
30
+ - apimap
31
+ Set-Cookie:
32
+ - BAIDUID=58A36BFA8D0136CCCA20F261AA57EFD8:FG=1; max-age=31536000; expires=Sat,
33
+ 19-Sep-15 16:27:25 GMT; domain=.baidu.com; path=/; version=1
34
+ P3p:
35
+ - CP=" OTI DSP COR IVA OUR IND COM "
36
+ Content-Type:
37
+ - text/javascript; charset=UTF-8
38
+ Vary:
39
+ - Accept-Encoding
40
+ Transfer-Encoding:
41
+ - chunked
42
+ Date:
43
+ - Fri, 19 Sep 2014 16:27:25 GMT
44
+ Server:
45
+ - apache
46
+ body:
47
+ encoding: UTF-8
48
+ string: '{"status":0,"message":"\u6210\u529f"}'
49
+ http_version:
50
+ recorded_at: Fri, 19 Sep 2014 16:27:28 GMT
51
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,51 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://api.map.baidu.com/geodata/v3/geotable/create
6
+ body:
7
+ encoding: UTF-8
8
+ string: ak=KmMATCZL0fakL8XkCWZsuS0K&geotype=1&is_published=1&name=awesome_places
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v0.9.0
12
+ Content-Type:
13
+ - application/x-www-form-urlencoded
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ Accept:
17
+ - "*/*"
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Http-X-Bd-Logid:
24
+ - '817409057'
25
+ Http-X-Bd-Logid64:
26
+ - '6330308918598566282'
27
+ Http-X-Bd-Product:
28
+ - map
29
+ Http-X-Bd-Subsys:
30
+ - apimap
31
+ Set-Cookie:
32
+ - BAIDUID=7F351845471C45010A9651DE173C5BE5:FG=1; max-age=31536000; expires=Fri,
33
+ 18-Sep-15 21:46:01 GMT; domain=.baidu.com; path=/; version=1
34
+ P3p:
35
+ - CP=" OTI DSP COR IVA OUR IND COM "
36
+ Content-Type:
37
+ - text/javascript; charset=UTF-8
38
+ Vary:
39
+ - Accept-Encoding
40
+ Transfer-Encoding:
41
+ - chunked
42
+ Date:
43
+ - Thu, 18 Sep 2014 21:46:02 GMT
44
+ Server:
45
+ - apache
46
+ body:
47
+ encoding: UTF-8
48
+ string: '{"status":0,"id":78706,"message":"\u6210\u529f"}'
49
+ http_version:
50
+ recorded_at: Thu, 18 Sep 2014 21:46:02 GMT
51
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,51 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://api.map.baidu.com/geodata/v3/geotable/delete
6
+ body:
7
+ encoding: UTF-8
8
+ string: ak=KmMATCZL0fakL8XkCWZsuS0K&id=78706
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v0.9.0
12
+ Content-Type:
13
+ - application/x-www-form-urlencoded
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ Accept:
17
+ - "*/*"
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Http-X-Bd-Logid:
24
+ - '58601585'
25
+ Http-X-Bd-Logid64:
26
+ - '696988953308064174'
27
+ Http-X-Bd-Product:
28
+ - map
29
+ Http-X-Bd-Subsys:
30
+ - apimap
31
+ Set-Cookie:
32
+ - BAIDUID=6592D24CBC56257178F44F4C3143E523:FG=1; max-age=31536000; expires=Fri,
33
+ 18-Sep-15 22:05:10 GMT; domain=.baidu.com; path=/; version=1
34
+ P3p:
35
+ - CP=" OTI DSP COR IVA OUR IND COM "
36
+ Content-Type:
37
+ - text/javascript; charset=UTF-8
38
+ Vary:
39
+ - Accept-Encoding
40
+ Transfer-Encoding:
41
+ - chunked
42
+ Date:
43
+ - Thu, 18 Sep 2014 22:05:11 GMT
44
+ Server:
45
+ - apache
46
+ body:
47
+ encoding: UTF-8
48
+ string: '{"status":0,"message":"\u6210\u529f"}'
49
+ http_version:
50
+ recorded_at: Thu, 18 Sep 2014 22:05:12 GMT
51
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,50 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://api.map.baidu.com/geodata/v3/geotable/detail?ak=KmMATCZL0fakL8XkCWZsuS0K&id=78706
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v0.9.0
12
+ Accept-Encoding:
13
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
+ Accept:
15
+ - "*/*"
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Http-X-Bd-Logid:
22
+ - '295240796'
23
+ Http-X-Bd-Logid64:
24
+ - '13790798623277884008'
25
+ Http-X-Bd-Product:
26
+ - map
27
+ Http-X-Bd-Subsys:
28
+ - apimap
29
+ Set-Cookie:
30
+ - BAIDUID=051C619B49AA55297DA8AE7578E4CE3B:FG=1; max-age=31536000; expires=Fri,
31
+ 18-Sep-15 21:59:09 GMT; domain=.baidu.com; path=/; version=1
32
+ P3p:
33
+ - CP=" OTI DSP COR IVA OUR IND COM "
34
+ Content-Type:
35
+ - text/javascript; charset=UTF-8
36
+ Vary:
37
+ - Accept-Encoding
38
+ Transfer-Encoding:
39
+ - chunked
40
+ Date:
41
+ - Thu, 18 Sep 2014 21:59:09 GMT
42
+ Server:
43
+ - apache
44
+ body:
45
+ encoding: UTF-8
46
+ string: '{"status":0,"geotable":{"id":78706,"name":"awesome_places","geotype":1,"create_time":"2014-09-19
47
+ 05:46:01","modify_time":"2014-09-19 05:46:01","is_published":1},"message":"\u6210\u529f"}'
48
+ http_version:
49
+ recorded_at: Thu, 18 Sep 2014 21:59:09 GMT
50
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,50 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://api.map.baidu.com/geodata/v3/geotable/list?ak=KmMATCZL0fakL8XkCWZsuS0K
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v0.9.0
12
+ Accept-Encoding:
13
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
+ Accept:
15
+ - "*/*"
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Http-X-Bd-Logid:
22
+ - '1992350224'
23
+ Http-X-Bd-Logid64:
24
+ - '6998997136585407065'
25
+ Http-X-Bd-Product:
26
+ - map
27
+ Http-X-Bd-Subsys:
28
+ - apimap
29
+ Set-Cookie:
30
+ - BAIDUID=5AE80519D48A27BE5E7696A9E4D0EF30:FG=1; max-age=31536000; expires=Fri,
31
+ 18-Sep-15 21:57:22 GMT; domain=.baidu.com; path=/; version=1
32
+ P3p:
33
+ - CP=" OTI DSP COR IVA OUR IND COM "
34
+ Content-Type:
35
+ - text/javascript; charset=UTF-8
36
+ Vary:
37
+ - Accept-Encoding
38
+ Transfer-Encoding:
39
+ - chunked
40
+ Date:
41
+ - Thu, 18 Sep 2014 21:57:22 GMT
42
+ Server:
43
+ - apache
44
+ body:
45
+ encoding: UTF-8
46
+ string: '{"status":0,"geotables":[{"id":78706,"name":"awesome_places","geotype":1,"create_time":"2014-09-19
47
+ 05:46:01","modify_time":"2014-09-19 05:46:01","is_published":1}],"size":1,"message":"\u6210\u529f"}'
48
+ http_version:
49
+ recorded_at: Thu, 18 Sep 2014 21:57:23 GMT
50
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,51 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://api.map.baidu.com/geodata/v3/geotable/update
6
+ body:
7
+ encoding: UTF-8
8
+ string: ak=KmMATCZL0fakL8XkCWZsuS0K&id=78706&name=cool_places
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v0.9.0
12
+ Content-Type:
13
+ - application/x-www-form-urlencoded
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ Accept:
17
+ - "*/*"
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Http-X-Bd-Logid:
24
+ - '3318759940'
25
+ Http-X-Bd-Logid64:
26
+ - '1552921025928524256'
27
+ Http-X-Bd-Product:
28
+ - map
29
+ Http-X-Bd-Subsys:
30
+ - apimap
31
+ Set-Cookie:
32
+ - BAIDUID=02AA846217F78C6BA468588BCBC7341E:FG=1; max-age=31536000; expires=Fri,
33
+ 18-Sep-15 22:03:57 GMT; domain=.baidu.com; path=/; version=1
34
+ P3p:
35
+ - CP=" OTI DSP COR IVA OUR IND COM "
36
+ Content-Type:
37
+ - text/javascript; charset=UTF-8
38
+ Vary:
39
+ - Accept-Encoding
40
+ Transfer-Encoding:
41
+ - chunked
42
+ Date:
43
+ - Thu, 18 Sep 2014 22:03:57 GMT
44
+ Server:
45
+ - apache
46
+ body:
47
+ encoding: UTF-8
48
+ string: '{"status":0,"message":"\u6210\u529f"}'
49
+ http_version:
50
+ recorded_at: Thu, 18 Sep 2014 22:03:57 GMT
51
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,49 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://api.map.baidu.com/geodata/v3/job/detail?ak=KmMATCZL0fakL8XkCWZsuS0K&id=541c6ee0ba6000ac648b4567
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v0.9.0
12
+ Accept-Encoding:
13
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
+ Accept:
15
+ - "*/*"
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Http-X-Bd-Logid:
22
+ - '3006097250'
23
+ Http-X-Bd-Logid64:
24
+ - '18027366948170174299'
25
+ Http-X-Bd-Product:
26
+ - map
27
+ Http-X-Bd-Subsys:
28
+ - apimap
29
+ Set-Cookie:
30
+ - BAIDUID=9A8F9BD2B08A7AA7D591388904DA409F:FG=1; max-age=31536000; expires=Sat,
31
+ 19-Sep-15 19:34:40 GMT; domain=.baidu.com; path=/; version=1
32
+ P3p:
33
+ - CP=" OTI DSP COR IVA OUR IND COM "
34
+ Content-Type:
35
+ - text/javascript; charset=UTF-8
36
+ Vary:
37
+ - Accept-Encoding
38
+ Transfer-Encoding:
39
+ - chunked
40
+ Date:
41
+ - Fri, 19 Sep 2014 19:34:40 GMT
42
+ Server:
43
+ - apache
44
+ body:
45
+ encoding: UTF-8
46
+ string: '{"status":0,"job":null,"message":"\u6210\u529f"}'
47
+ http_version:
48
+ recorded_at: Fri, 19 Sep 2014 19:34:40 GMT
49
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,56 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://api.map.baidu.com/geodata/v3/job/list?ak=KmMATCZL0fakL8XkCWZsuS0K
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v0.9.0
12
+ Accept-Encoding:
13
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
+ Accept:
15
+ - "*/*"
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Http-X-Bd-Logid:
22
+ - '3360865177'
23
+ Http-X-Bd-Logid64:
24
+ - '11406244037598334425'
25
+ Http-X-Bd-Product:
26
+ - map
27
+ Http-X-Bd-Subsys:
28
+ - apimap
29
+ Set-Cookie:
30
+ - BAIDUID=573369A73D1CA333E0112C8D8FE98BD1:FG=1; max-age=31536000; expires=Sat,
31
+ 19-Sep-15 19:27:23 GMT; domain=.baidu.com; path=/; version=1
32
+ P3p:
33
+ - CP=" OTI DSP COR IVA OUR IND COM "
34
+ Content-Type:
35
+ - text/javascript; charset=UTF-8
36
+ Vary:
37
+ - Accept-Encoding
38
+ Transfer-Encoding:
39
+ - chunked
40
+ Date:
41
+ - Fri, 19 Sep 2014 19:27:23 GMT
42
+ Server:
43
+ - apache
44
+ body:
45
+ encoding: UTF-8
46
+ string: '{"status":0,"jobs":[{"create_time":"2014-09-20 00:32:08","error":0,"modify_time":"2014-09-20
47
+ 00:32:08","poi_fail":0,"poi_format_error":0,"poi_size":0,"poi_success":0,"status":3,"type":3,"id":"541c5a880449e4df7f8b4567"},{"create_time":"2014-09-20
48
+ 00:26:09","error":0,"modify_time":"2014-09-20 00:26:09","poi_fail":0,"poi_format_error":0,"poi_size":0,"poi_success":0,"status":3,"type":3,"id":"541c592136c92b3c4a8b4567"},{"create_time":"2014-09-20
49
+ 00:17:14","error":0,"modify_time":"2014-09-20 00:17:14","poi_fail":0,"poi_format_error":0,"poi_size":0,"poi_success":0,"status":3,"type":3,"id":"541c570a2323af1d7f8b4567"},{"create_time":"2014-09-20
50
+ 00:15:50","error":0,"modify_time":"2014-09-20 00:15:50","poi_fail":0,"poi_format_error":0,"poi_size":0,"poi_success":0,"status":3,"type":3,"id":"541c56b65685d030ba8b4567"},{"create_time":"2014-09-20
51
+ 00:01:43","error":0,"modify_time":"2014-09-20 00:01:43","poi_fail":0,"poi_format_error":0,"poi_size":0,"poi_success":0,"status":3,"type":3,"id":"541c536755a3f6593e8b4567"},{"create_time":"2014-09-20
52
+ 00:00:02","error":0,"modify_time":"2014-09-20 00:00:02","poi_fail":0,"poi_format_error":0,"poi_size":0,"poi_success":0,"status":3,"type":3,"id":"541c5302b31331f3608b4567"},{"create_time":"2014-09-19
53
+ 23:53:38","error":0,"modify_time":"2014-09-19 23:53:38","poi_fail":0,"poi_format_error":0,"poi_size":0,"poi_success":0,"status":3,"type":3,"id":"541c518242fd79a71d8b4567"}],"message":"\u6210\u529f"}'
54
+ http_version:
55
+ recorded_at: Fri, 19 Sep 2014 19:27:23 GMT
56
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,51 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://api.map.baidu.com/geodata/v3/poi/create
6
+ body:
7
+ encoding: UTF-8
8
+ string: ak=KmMATCZL0fakL8XkCWZsuS0K&coord_type=1&geotable_id=78835&latitude=100&longitude=100&title=awesome_poi
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v0.9.0
12
+ Content-Type:
13
+ - application/x-www-form-urlencoded
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ Accept:
17
+ - "*/*"
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Http-X-Bd-Logid:
24
+ - '3197176535'
25
+ Http-X-Bd-Logid64:
26
+ - '9111204759859461741'
27
+ Http-X-Bd-Product:
28
+ - map
29
+ Http-X-Bd-Subsys:
30
+ - apimap
31
+ Set-Cookie:
32
+ - BAIDUID=03A57C73130AB5AEC6599A9DECEBEFCC:FG=1; max-age=31536000; expires=Sat,
33
+ 19-Sep-15 17:04:51 GMT; domain=.baidu.com; path=/; version=1
34
+ P3p:
35
+ - CP=" OTI DSP COR IVA OUR IND COM "
36
+ Content-Type:
37
+ - text/javascript; charset=UTF-8
38
+ Vary:
39
+ - Accept-Encoding
40
+ Transfer-Encoding:
41
+ - chunked
42
+ Date:
43
+ - Fri, 19 Sep 2014 17:04:51 GMT
44
+ Server:
45
+ - apache
46
+ body:
47
+ encoding: UTF-8
48
+ string: '{"status":0,"id":499222817,"message":"\u6210\u529f"}'
49
+ http_version:
50
+ recorded_at: Fri, 19 Sep 2014 17:04:51 GMT
51
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,50 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://api.map.baidu.com/geodata/v3/poi/detail?ak=KmMATCZL0fakL8XkCWZsuS0K&geotable_id=78835&id=499219466
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v0.9.0
12
+ Accept-Encoding:
13
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
+ Accept:
15
+ - "*/*"
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Http-X-Bd-Logid:
22
+ - '2859288442'
23
+ Http-X-Bd-Logid64:
24
+ - '11191611675349025927'
25
+ Http-X-Bd-Product:
26
+ - map
27
+ Http-X-Bd-Subsys:
28
+ - apimap
29
+ Set-Cookie:
30
+ - BAIDUID=1BABE8789571EA9EEA577D6B2617C1F7:FG=1; max-age=31536000; expires=Sat,
31
+ 19-Sep-15 17:21:00 GMT; domain=.baidu.com; path=/; version=1
32
+ P3p:
33
+ - CP=" OTI DSP COR IVA OUR IND COM "
34
+ Content-Type:
35
+ - text/javascript; charset=UTF-8
36
+ Vary:
37
+ - Accept-Encoding
38
+ Transfer-Encoding:
39
+ - chunked
40
+ Date:
41
+ - Fri, 19 Sep 2014 17:21:00 GMT
42
+ Server:
43
+ - apache
44
+ body:
45
+ encoding: UTF-8
46
+ string: '{"status":0,"poi":{"city":"","create_time":"2014-09-20 00:56:56","district":"","geotable_id":78835,"location":[100,100],"modify_time":"2014-09-20
47
+ 01:16:02","province":"","title":"cool_poi","city_id":0,"id":499219466},"message":"\u6210\u529f"}'
48
+ http_version:
49
+ recorded_at: Fri, 19 Sep 2014 17:21:00 GMT
50
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,50 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://api.map.baidu.com/geodata/v3/poi/detail?ak=KmMATCZL0fakL8XkCWZsuS0K&geotable_id=78835&id=499219466
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v0.9.0
12
+ Accept-Encoding:
13
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
+ Accept:
15
+ - "*/*"
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Http-X-Bd-Logid:
22
+ - '2900684740'
23
+ Http-X-Bd-Logid64:
24
+ - '2249608670594214191'
25
+ Http-X-Bd-Product:
26
+ - map
27
+ Http-X-Bd-Subsys:
28
+ - apimap
29
+ Set-Cookie:
30
+ - BAIDUID=F47217322DC8B0E4706F9BE36F86B6C2:FG=1; max-age=31536000; expires=Sat,
31
+ 19-Sep-15 17:11:30 GMT; domain=.baidu.com; path=/; version=1
32
+ P3p:
33
+ - CP=" OTI DSP COR IVA OUR IND COM "
34
+ Content-Type:
35
+ - text/javascript; charset=UTF-8
36
+ Vary:
37
+ - Accept-Encoding
38
+ Transfer-Encoding:
39
+ - chunked
40
+ Date:
41
+ - Fri, 19 Sep 2014 17:11:30 GMT
42
+ Server:
43
+ - apache
44
+ body:
45
+ encoding: UTF-8
46
+ string: '{"status":0,"poi":{"city":"","create_time":"2014-09-20 00:56:56","district":"","geotable_id":78835,"location":[100,100],"modify_time":"2014-09-20
47
+ 01:02:54","province":"","title":"awesome_poi","city_id":0,"id":499219466},"message":"\u6210\u529f"}'
48
+ http_version:
49
+ recorded_at: Fri, 19 Sep 2014 17:11:30 GMT
50
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,52 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://api.map.baidu.com/geodata/v3/poi/list?ak=KmMATCZL0fakL8XkCWZsuS0K&geotable_id=78835&title=awesome_poi
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v0.9.0
12
+ Accept-Encoding:
13
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
+ Accept:
15
+ - "*/*"
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Http-X-Bd-Logid:
22
+ - '1304238451'
23
+ Http-X-Bd-Logid64:
24
+ - '8475257786898458674'
25
+ Http-X-Bd-Product:
26
+ - map
27
+ Http-X-Bd-Subsys:
28
+ - apimap
29
+ Set-Cookie:
30
+ - BAIDUID=928B02512B441D5DCA56568D5548017C:FG=1; max-age=31536000; expires=Sat,
31
+ 19-Sep-15 17:09:32 GMT; domain=.baidu.com; path=/; version=1
32
+ P3p:
33
+ - CP=" OTI DSP COR IVA OUR IND COM "
34
+ Content-Type:
35
+ - text/javascript; charset=UTF-8
36
+ Vary:
37
+ - Accept-Encoding
38
+ Transfer-Encoding:
39
+ - chunked
40
+ Date:
41
+ - Fri, 19 Sep 2014 17:09:32 GMT
42
+ Server:
43
+ - apache
44
+ body:
45
+ encoding: UTF-8
46
+ string: '{"status":0,"size":2,"total":2,"pois":[{"title":"awesome_poi","location":[100,100],"city":"","create_time":"2014-09-20
47
+ 01:04:51","geotable_id":78835,"province":"","district":"","city_id":0,"id":499222817},{"city":"","create_time":"2014-09-20
48
+ 00:56:56","district":"","geotable_id":78835,"location":[100,100],"modify_time":"2014-09-20
49
+ 01:02:54","province":"","title":"awesome_poi","city_id":0,"id":499219466}],"message":"\u6210\u529f"}'
50
+ http_version:
51
+ recorded_at: Fri, 19 Sep 2014 17:09:32 GMT
52
+ recorded_with: VCR 2.9.3