Time_Traveler 0.1.70 → 0.1.71

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: c1761c1c6e755c2091fdc47f463d1c35ac169cb2
4
- data.tar.gz: 11aa9f46271524f881645a3a77e569f96e81d1d4
3
+ metadata.gz: ebceabc70a038f8d23e3b8bda29bfe7107484baa
4
+ data.tar.gz: da4c4c91f1b2250ccdf3cbcd07ad3a7459c0d522
5
5
  SHA512:
6
- metadata.gz: fa15a0f3b2842f537429944e3bafd5ed889288ed99955ae9482a2d6f5daca74ac295930af70714cb197a9a3ab2bfb884d5f96135f9e6d64e980a069011d72b98
7
- data.tar.gz: ba9b75ee3bcf2cd6ff63fa2c8787c8c7808817fd44b57f8fecc23614830f3b6f5c03f46e99013329d8cbc3724c58f8e3a479b7b4cb1012f66b958043441b06ee
6
+ metadata.gz: 042309b39137616272e5c52fa11dfea3791e2281cd9f5160f2cfca104322e6c54475a85abf7cf8f0d672bee075fa24ea3b6dbdc40038d96f201afd622c50d13f
7
+ data.tar.gz: e914b49f162cbb473afb2f098ea4ffced8736099b5977eaf5ab6768ce44ec1529430d06fb260407d1d3b41db7e6274b0c7fca3e7e5a6a6a191f16ddeb1206669
data/bin/googleplace CHANGED
File without changes
@@ -8,6 +8,7 @@ module Airbnb
8
8
  API_VER = 'v2'
9
9
  Airbnb_API_URL = URI.join(Airbnb_URL, "#{API_VER}/")
10
10
  Search_URL = URI.join(Airbnb_API_URL, "search_results")
11
+ Price_URL = URI.join(Airbnb_API_URL, "listings")
11
12
 
12
13
  def self.config=(credentials)
13
14
  @config ? @config.update(credentials) : @config = credentials
@@ -27,5 +28,11 @@ module Airbnb
27
28
 
28
29
  end
29
30
 
31
+ # def self.findPrice(room_id)
32
+ # response = HTTP.get(Price_URL,
33
+ # params: { client_id: config[:airbnb_id],
34
+ # location: location
35
+ # })
36
+
30
37
  end
31
38
  end
@@ -25,11 +25,19 @@ module Airbnb
25
25
  private
26
26
  def room(item)
27
27
  #item = item['listing']
28
+ room_id = item['listing']['id']
28
29
  room = {
29
- city: item['listing']['city'],
30
+ id: room_id,
30
31
  name: item['listing']['name'],
31
- pic_url: item['listing']['picture_url'],
32
- id: item['listing']['id']
32
+ # need to get price from airbnbAPI
33
+ # Basic Sample Request:
34
+ # https://api.airbnb.com/v2/listings/5116458?client_id=3092nxybyb0otqw18e8nh5nty&_format=v1_legacy_for_p3
35
+ address: item['listing']['public_address'],
36
+ airbnb_link: "https://www.airbnb.com.tw/rooms/" + room_id.to_s,
37
+ roomImg: item['listing']['picture_url'],
38
+ bed: item['listing']['beds'],
39
+ roomRank: item['listing']['star_rating']
40
+
33
41
  }
34
42
  end
35
43
 
@@ -21,7 +21,8 @@ module Skyscanner
21
21
  params: {
22
22
  apiKey: config[:skyscanner_id]
23
23
  })
24
- originData = JSON.load(skyscanner_response.body.to_s)
24
+ print skyscanner_response
25
+ originData = JSON.load(skyscanner_response.to_s)
25
26
  end
26
27
  end
27
28
  end
@@ -1,3 +1,3 @@
1
1
  module Time_Traveler
2
- VERSION = '0.1.70'
2
+ VERSION = '0.1.71'
3
3
  end
@@ -17,8 +17,9 @@ describe 'Load specifications' do
17
17
  end
18
18
 
19
19
  it 'should be able to get the data from Skyscanner' do
20
- skyscanner_load = Skyscanner::FlightInfo.find(market: 'TW', currency: 'TWD', locale: 'en-GB', originPlace: 'TW', destinationPlace: 'UK', outboundPartialDate: '2016-11-20')
20
+ skyscanner_load = Skyscanner::FlightInfo.find(market: 'TW', currency: 'TWD', locale: 'en-GB', originPlace: 'TW', destinationPlace: 'UK', outboundPartialDate: 'anytime')
21
21
  flightInfo = skyscanner_load.flightInfo
22
+ print skyscanner_load
22
23
  flightInfo.length.must_be :>,0
23
24
  end
24
25
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: Time_Traveler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.70
4
+ version: 0.1.71
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yvonne Shih
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2016-11-18 00:00:00.000000000 Z
13
+ date: 2016-11-27 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: http