loops_rails 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +27 -9
- data/lib/loops_rails/client/{api_key.rb → test_api_key.rb} +2 -2
- data/lib/loops_rails/client.rb +2 -2
- data/lib/loops_rails/version.rb +1 -1
- data/lib/loops_rails.rb +1 -2
- data/loops_rails-0.1.0.gem +0 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f4a01b300b7edd07daf94406b06af9fcc49ecca1a8f731240ead0bfa845baed9
|
4
|
+
data.tar.gz: 8891a9cce0094da646b82f24e1f9b29a9e1d9d567d7ef2baaad788cd6ceb9443
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 84ec1a3d1406415776686e8cb97edb2dff593f8be3fc8592eb80f40ee838a89c991e15309af14e9ac6f46c44cec347e0f1a4302e8b229cc0adba2302bf632f14
|
7
|
+
data.tar.gz: 89474f2371cd1e2ca408e590aced6520a40d30540574a2c9d379df5b1b5b39a74756388b1cbd642e66681e0643c81617ab72ad06876f41c48d53416d925ff065
|
data/README.md
CHANGED
@@ -1,24 +1,33 @@
|
|
1
1
|
# LoopsRails
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/loops_rails`. To experiment with that code, run `bin/console` for an interactive prompt.
|
3
|
+
LoopsRails is a Rails client for the [Loops](https://loops.so) API.
|
6
4
|
|
7
5
|
## Installation
|
8
6
|
|
9
|
-
TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
|
10
|
-
|
11
7
|
Install the gem and add to the application's Gemfile by executing:
|
12
8
|
|
13
|
-
$ bundle add
|
9
|
+
$ bundle add loops_rails
|
14
10
|
|
15
11
|
If bundler is not being used to manage dependencies, install the gem by executing:
|
16
12
|
|
17
|
-
$ gem install
|
13
|
+
$ gem install loops_rails
|
18
14
|
|
19
15
|
## Usage
|
20
16
|
|
21
|
-
|
17
|
+
1. Sign up for a [Loops](https://loops.so) account.
|
18
|
+
2. Create an API key in your account settings.
|
19
|
+
3. Use the API key to authenticate requests to the API.
|
20
|
+
|
21
|
+
```ruby
|
22
|
+
client = LoopsRails::Client.new(api_key: "your_api_key")
|
23
|
+
|
24
|
+
client.api_keys.test
|
25
|
+
client.contacts.create(email: "john@example.com")
|
26
|
+
client.transactional_emails.send(
|
27
|
+
email: "john@example.com",
|
28
|
+
transactional_id: "your_transactional_id"
|
29
|
+
)
|
30
|
+
```
|
22
31
|
|
23
32
|
## Development
|
24
33
|
|
@@ -26,9 +35,18 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run
|
|
26
35
|
|
27
36
|
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
28
37
|
|
38
|
+
## TODO
|
39
|
+
|
40
|
+
- [X] Add support for the `/api-key` endpoint
|
41
|
+
- [X] Add support for the `/contacts` endpoint
|
42
|
+
- [X] Add support for the `/transactional` endpoint
|
43
|
+
- [ ] Add support for the `/lists` endpoint
|
44
|
+
- [ ] Add support for the `/events` endpoint
|
45
|
+
- [ ] Add support for the `/customFields` endpoint
|
46
|
+
|
29
47
|
## Contributing
|
30
48
|
|
31
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
49
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/danielfriis/loops_rails.
|
32
50
|
|
33
51
|
## License
|
34
52
|
|
data/lib/loops_rails/client.rb
CHANGED
data/lib/loops_rails/version.rb
CHANGED
data/lib/loops_rails.rb
CHANGED
@@ -6,11 +6,10 @@ require_relative "loops_rails/version"
|
|
6
6
|
require_relative "loops_rails/client"
|
7
7
|
require_relative "loops_rails/configuration"
|
8
8
|
require_relative "loops_rails/client/api_resource"
|
9
|
-
require_relative "loops_rails/client/
|
9
|
+
require_relative "loops_rails/client/test_api_key"
|
10
10
|
require_relative "loops_rails/client/contacts"
|
11
11
|
require_relative "loops_rails/client/transactional_emails"
|
12
12
|
|
13
13
|
module LoopsRails
|
14
14
|
class Error < StandardError; end
|
15
|
-
|
16
15
|
end
|
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: loops_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Friis
|
@@ -37,12 +37,13 @@ files:
|
|
37
37
|
- Rakefile
|
38
38
|
- lib/loops_rails.rb
|
39
39
|
- lib/loops_rails/client.rb
|
40
|
-
- lib/loops_rails/client/api_key.rb
|
41
40
|
- lib/loops_rails/client/api_resource.rb
|
42
41
|
- lib/loops_rails/client/contacts.rb
|
42
|
+
- lib/loops_rails/client/test_api_key.rb
|
43
43
|
- lib/loops_rails/client/transactional_emails.rb
|
44
44
|
- lib/loops_rails/configuration.rb
|
45
45
|
- lib/loops_rails/version.rb
|
46
|
+
- loops_rails-0.1.0.gem
|
46
47
|
- loops_rails.gemspec
|
47
48
|
- sig/loops_rails.rbs
|
48
49
|
homepage: https://github.com/danielfriis/loops_rails
|