hello-asso-api 0.0.1

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 0301e745ac9e5dd311409166497f76d57a8ffaac
4
+ data.tar.gz: 855af1fae059cc558aa663fcfffcea96c8de0732
5
+ SHA512:
6
+ metadata.gz: 35cc026be1eb3864b66662680bc7ab2d3d1a42a15df5d63ab72ba7b81a6dbfd9c69bc951bcc5d0110ca3f320473578cc160e4ed5d501e36a1c15c6fa40c89584
7
+ data.tar.gz: 44052af770b87e6553798f3d85a25355c4f542e84188d1d0e1bffd38e04f5f1978ab30bcd0e090ae127d0fd5ef8edbab4f820f122e2b4016a1f13b4f5af26640
@@ -0,0 +1,11 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ require 'httparty'
4
+ require 'cgi'
5
+ require 'hello-asso-api/url'
6
+ require 'hello-asso-api/organization'
7
+ require 'hello-asso-api/donate'
8
+
9
+ module HelloAssoApi
10
+
11
+ end
@@ -0,0 +1,11 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ module HelloAssoApi
4
+ class Donate
5
+ include HTTParty
6
+
7
+ def self.get_url(params={})
8
+ HelloAssoApi::HTTPS_URL + 'donate?' + params.collect { |k,v| "#{k}=#{v}" }.join("&")
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,15 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ module HelloAssoApi
4
+ class Organization
5
+ include HTTParty
6
+
7
+ def self.fetch(param)
8
+ HTTParty.get(HelloAssoApi::HTTP_URL + param.to_s)
9
+ end
10
+
11
+ def self.fetchAll(page = 1)
12
+ HTTParty.get(HelloAssoApi::HTTP_URL + 'organizations/' + page.to_s)
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,6 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ module HelloAssoApi
4
+ HTTP_URL = 'http://api.helloasso.com/'
5
+ HTTPS_URL = 'https://api.helloasso.com/'
6
+ end
metadata ADDED
@@ -0,0 +1,48 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: hello-asso-api
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Charles Duprey
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-06-30 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: A basic gem to use the payment system of HelloAsso
14
+ email: cduprey@f1m.fr
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - lib/hello-asso-api.rb
20
+ - lib/hello-asso-api/organization.rb
21
+ - lib/hello-asso-api/url.rb
22
+ - lib/hello-asso-api/donate.rb
23
+ homepage: https://github.com/pitch-me-git/hello-asso-api
24
+ licenses:
25
+ - MIT
26
+ metadata: {}
27
+ post_install_message:
28
+ rdoc_options:
29
+ - --charset=UTF-8
30
+ require_paths:
31
+ - lib
32
+ required_ruby_version: !ruby/object:Gem::Requirement
33
+ requirements:
34
+ - - '>='
35
+ - !ruby/object:Gem::Version
36
+ version: '0'
37
+ required_rubygems_version: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - '>='
40
+ - !ruby/object:Gem::Version
41
+ version: '0'
42
+ requirements: []
43
+ rubyforge_project:
44
+ rubygems_version: 2.0.14
45
+ signing_key:
46
+ specification_version: 4
47
+ summary: Interact with HelloAsso's API
48
+ test_files: []