intervals_api 1.5.1 → 1.5.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 28f792607ddeff3949904c3b1186bc2f11ab07f4
4
- data.tar.gz: 44240e86774fb89dfa49ebe7f2b4dd3ec85310f8
3
+ metadata.gz: eec156a63df10bd5b4e6d4f8a5bd5822b9435a56
4
+ data.tar.gz: d6c41ed9462045a8793dc9e6f7a266d50cf8df05
5
5
  SHA512:
6
- metadata.gz: c923f62f162a21b3d8cace555788685645b93394f46f1af29a99c3b28e1c86c159a3efc38e32f46a248034da49f57f2064567cc8c3a4b156d409fd3656ef5521
7
- data.tar.gz: c337f295d3cf4ce33f724afa95e0320fb4a25a8ca0546fa85acfa65f9e5e58c4955705b877979b73927983d9a02bc2ff5dd52e94b82c25e164922e19dc4cbcfe
6
+ metadata.gz: 5fce195f0fbee76e49c09ea04673351f7a7311106255b8ac598cbdc81e618ec5a5ddb79e166cb5770289bc4f4a37cbf1d9a73122f4d61dc2daa4f224297c2dae
7
+ data.tar.gz: 42e2e017b1558aed5fe86f00ccd6849ee8b4bfc8574e879512dbaabd54062a4476db749128c8135b1d9315c16d52d00013c4899d9bab945ecb5b3bd710bcf87f
data/README.md CHANGED
@@ -4,7 +4,9 @@ By [Staplegun](http://staplegun.us)
4
4
  ## Description
5
5
 
6
6
  This gem is a wrapper around the [Intervals](http://www.myintervals.com/) REST API which allows you to retrieve,
7
- create, update, and delete several different resources from their database.
7
+ create, update, and delete several different resources from their database. All
8
+ API requests are made with the help of the
9
+ [HTTParty gem](https://github.com/jnunemaker/httparty).
8
10
 
9
11
  ## Usage
10
12
 
@@ -33,11 +35,19 @@ The endpoint resource you are querying
33
35
  Type: `Hash`
34
36
  Default: `{}`
35
37
 
36
- A hash of options that you wish to query by. This could be filter options for a
38
+ A hash of options, such as filter options for a
37
39
  GET request, new object options for a POST request, etc.
38
40
 
39
- [View the Intervals documentation](http://www.myintervals.com/api/) to learn
40
- about which resources and query options are available to use
41
+ Available keys (See in the examples how they're used):
42
+
43
+ * *query* - Query parameters that you wish to pass, typically via GET
44
+ * *body* - Data you wish to submit, typically via POST or PUT
45
+ * *headers* - Request headers you wish to set
46
+
47
+ [View the HTTParty gem](https://github.com/jnunemaker/httparty) to see more options
48
+ about formatting your request, and
49
+ [view the Intervals documentation](http://www.myintervals.com/api/) to learn
50
+ about which resources are available to request.
41
51
 
42
52
  ### Response
43
53
 
@@ -54,14 +64,16 @@ response = intervals.get('/client/');
54
64
 
55
65
  ```ruby
56
66
  # Retrieve all active clients
57
- response = intervals.get('/client/', { active: true });
67
+ response = intervals.get('/client/', query: {
68
+ active: true
69
+ });
58
70
  ```
59
71
 
60
72
  #### Post
61
73
 
62
74
  ```ruby
63
75
  # Create a task request
64
- intervals.post('/request/', {
76
+ intervals.post('/request/', body: {
65
77
  personid: 5,
66
78
  projectid: 6,
67
79
  title: 'Just an average title'
@@ -72,7 +84,7 @@ intervals.post('/request/', {
72
84
 
73
85
  ```ruby
74
86
  # Update a task request
75
- intervals.put('/request/1/', {
87
+ intervals.put('/request/1/', body: {
76
88
  priorityid: 1,
77
89
  title: "Here's an updated title"
78
90
  })
@@ -12,5 +12,5 @@ Gem::Specification.new do |s|
12
12
  s.license = "GPL"
13
13
 
14
14
  s.add_runtime_dependency 'recursive-open-struct', '~> 0.5', '>= 0.5.0'
15
- s.add_runtime_dependency 'httparty', '~> 0.13', '>= 0.13.1'
15
+ s.add_runtime_dependency 'httparty', '~> 0.13', '>= 0.13.3'
16
16
  end
@@ -15,7 +15,7 @@ module IntervalsAPI
15
15
  }
16
16
  end
17
17
 
18
- %w(get post put delete options).each do |request_type|
18
+ %w(get post put delete).each do |request_type|
19
19
  define_method request_type do |url, options = {}|
20
20
 
21
21
  query_options = @default_options
@@ -1,3 +1,3 @@
1
1
  module IntervalsAPI
2
- VERSION='1.5.1'
2
+ VERSION='1.5.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: intervals_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.1
4
+ version: 1.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - interactive@staplegun.us
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-24 00:00:00.000000000 Z
11
+ date: 2015-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: recursive-open-struct
@@ -39,7 +39,7 @@ dependencies:
39
39
  version: '0.13'
40
40
  - - ">="
41
41
  - !ruby/object:Gem::Version
42
- version: 0.13.1
42
+ version: 0.13.3
43
43
  type: :runtime
44
44
  prerelease: false
45
45
  version_requirements: !ruby/object:Gem::Requirement
@@ -49,7 +49,7 @@ dependencies:
49
49
  version: '0.13'
50
50
  - - ">="
51
51
  - !ruby/object:Gem::Version
52
- version: 0.13.1
52
+ version: 0.13.3
53
53
  description:
54
54
  email:
55
55
  executables: []