intervals_api 1.5.1 → 1.5.2
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 +4 -4
- data/README.md +19 -7
- data/intervals_api.gemspec +1 -1
- data/lib/intervals_api/request_handler.rb +1 -1
- data/lib/intervals_api/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eec156a63df10bd5b4e6d4f8a5bd5822b9435a56
|
4
|
+
data.tar.gz: d6c41ed9462045a8793dc9e6f7a266d50cf8df05
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
-
|
40
|
-
|
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/',
|
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
|
})
|
data/intervals_api.gemspec
CHANGED
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.
|
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:
|
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.
|
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.
|
52
|
+
version: 0.13.3
|
53
53
|
description:
|
54
54
|
email:
|
55
55
|
executables: []
|