datelist 1.0.0
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 +7 -0
- data/lib/datelist.rb +32 -0
- metadata +57 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 7b80840db946015395009ce728ffe47f5954667758d20377874146dffc23cbf1
|
4
|
+
data.tar.gz: feb366d709f5573242ae43711664d71eefe8070a767f11cd49c30fe386025e61
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: dbccdbe89e6c61c2e8a7e055066ca0a05c4e87aef72ea2baad97d4211a458e3a9df49616caa9da31790e46b24a335982b3ad3b6b3696ccfa2d18f917b32359bc
|
7
|
+
data.tar.gz: c38faa0579582b01d338906e00f47ce79d7e6dcf44bafd21ce79207ec6f65527338ca3ba61d7c6c91f995d7fc2f745d5b5311c1ce88fc16b94e641a6db5cda0e
|
data/lib/datelist.rb
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'httparty'
|
2
|
+
|
3
|
+
class Datelist
|
4
|
+
def initialize(api_key)
|
5
|
+
@api_key = api_key
|
6
|
+
@headers = {
|
7
|
+
'Accept': 'application/json',
|
8
|
+
'Authorization': @api_key,
|
9
|
+
'Content-type': 'application/json'
|
10
|
+
}
|
11
|
+
end
|
12
|
+
|
13
|
+
def list_calendars(filters={})
|
14
|
+
url = 'https://datelist.io/api/calendars?' + URI.encode_www_form(filters.to_a)
|
15
|
+
JSON.parse(HTTParty.get(url, headers: @headers).response.body)
|
16
|
+
end
|
17
|
+
|
18
|
+
def list_products(filters={})
|
19
|
+
url = 'https://datelist.io/api/products?' + URI.encode_www_form(filters.to_a)
|
20
|
+
JSON.parse(HTTParty.get(url, headers: @headers).response.body)
|
21
|
+
end
|
22
|
+
|
23
|
+
def list_booked_slots(filters={})
|
24
|
+
url = 'https://datelist.io/api/booked_slots?' + URI.encode_www_form(filters.to_a)
|
25
|
+
JSON.parse(HTTParty.get(url, headers: @headers).response.body)
|
26
|
+
end
|
27
|
+
|
28
|
+
def update_booked_slot(id, data)
|
29
|
+
url = 'https://datelist.io/api/booked_slots/' + id.to_s
|
30
|
+
JSON.parse(HTTParty.patch(url, body: data.to_json, headers: @headers).response.body)
|
31
|
+
end
|
32
|
+
end
|
metadata
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: datelist
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Alexis Clarembeau
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2021-08-06 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: httparty
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
description: SDK for developing using https://datelist.io API in Ruby
|
28
|
+
email: alexis@datelist.io
|
29
|
+
executables: []
|
30
|
+
extensions: []
|
31
|
+
extra_rdoc_files: []
|
32
|
+
files:
|
33
|
+
- lib/datelist.rb
|
34
|
+
homepage: https://datelist.io
|
35
|
+
licenses:
|
36
|
+
- MIT
|
37
|
+
metadata: {}
|
38
|
+
post_install_message:
|
39
|
+
rdoc_options: []
|
40
|
+
require_paths:
|
41
|
+
- lib
|
42
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '0'
|
47
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
48
|
+
requirements:
|
49
|
+
- - ">="
|
50
|
+
- !ruby/object:Gem::Version
|
51
|
+
version: '0'
|
52
|
+
requirements: []
|
53
|
+
rubygems_version: 3.0.3
|
54
|
+
signing_key:
|
55
|
+
specification_version: 4
|
56
|
+
summary: SDK for developing using https://datelist.io API in Ruby
|
57
|
+
test_files: []
|