ammado 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +24 -3
- data/ammado.gemspec +1 -1
- data/lib/ammado/api_resource.rb +1 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b6f9de44b24d12957276291cd7a5573129aa0b40
|
4
|
+
data.tar.gz: 49b88db753a04a30567e41614b8bc78e638859a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 10538c98213cf8c0e7f419cba9ac8e08938c174bdc4d45fa070aabfe7dc650133579368341847be31f7d360a458d1a7ca54c93540ec3adeffcb8291b4da82c08
|
7
|
+
data.tar.gz: 92bab41fc4ba7bee974324bd1a1eb26be3bc2ea94e579f9e144e3ff34e55353bcf3b8a3f7a586f4543834289ddfbe90a85d9b88a1e64230ab3feb6481d695078
|
data/README.md
CHANGED
@@ -45,9 +45,12 @@ Implemented Endpoints and their usage
|
|
45
45
|
-------------------------------------
|
46
46
|
|
47
47
|
|
48
|
-
Note: you acn use parameter names both "beneficiary_id" and "beneficiaryId", but for better readibility and following Ruby standards,
|
48
|
+
Note: you acn use parameter names both "model.beneficiary_id" and "model.beneficiaryId", but for better readibility and following Ruby standards,
|
49
49
|
I recommend under_scored, not camelCase.
|
50
50
|
|
51
|
+
All the existing params can be set with "model.some_param=value" and "model.someParam=value".
|
52
|
+
|
53
|
+
To read all the params use "model.params" containing all the resource params.
|
51
54
|
|
52
55
|
|
53
56
|
### https://api.ammado.com/#FundraiserEndpoint
|
@@ -73,6 +76,24 @@ puts "All params for fundraiser are: #{ ammado_fundraiser.params.inspect }"
|
|
73
76
|
```
|
74
77
|
|
75
78
|
|
79
|
+
### https://api.ammado.com/#BeneficiaryEndpoint
|
80
|
+
|
81
|
+
```ruby
|
82
|
+
ammado_beneficiary = Ammado::Beneficiary.find(123)
|
83
|
+
|
84
|
+
if ammado_beneficiary
|
85
|
+
puts "Found a beneficiary, with type: "
|
86
|
+
puts ammado_beneficiary.beneficiary_type
|
87
|
+
puts "With raised amount: "
|
88
|
+
puts ammado_beneficiary.raised_amount
|
89
|
+
else
|
90
|
+
puts "Beneficiary not found"
|
91
|
+
end
|
92
|
+
|
93
|
+
puts "All params for ammado_beneficiary are: #{ ammado_beneficiary.params.inspect }"
|
94
|
+
```
|
95
|
+
|
96
|
+
|
76
97
|
|
77
98
|
### https://api.ammado.com/#FundraiserModeratorEndpoint
|
78
99
|
|
@@ -131,7 +152,7 @@ ammado_fundraiser_avatar = Ammado::FundraiserAvatar.create(
|
|
131
152
|
if ammado_fundraiser_avatar.created?
|
132
153
|
puts "Created a moderator, with params: #{ ammado_fundraiser_avatar.params.inspect }"
|
133
154
|
else
|
134
|
-
puts "Failed to create
|
155
|
+
puts "Failed to create ammado_fundraiser_avatar and got errors"
|
135
156
|
puts ammado_fundraiser_avatar.errors.map(&:message).join(', ')
|
136
157
|
end
|
137
158
|
```
|
@@ -151,7 +172,7 @@ ammado_fundraiser_cover = Ammado::FundraiserCover.create(
|
|
151
172
|
if ammado_fundraiser_cover.created?
|
152
173
|
puts "Created a moderator, with params: #{ ammado_fundraiser_cover.params.inspect }"
|
153
174
|
else
|
154
|
-
puts "Failed to create
|
175
|
+
puts "Failed to create ammado_fundraiser_cover and got errors: "
|
155
176
|
puts ammado_fundraiser_cover.errors.map(&:message).join(', ')
|
156
177
|
end
|
157
178
|
```
|
data/ammado.gemspec
CHANGED
data/lib/ammado/api_resource.rb
CHANGED