louxewtey-client 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/.redcar/tags CHANGED
@@ -1,12 +1,11 @@
1
- 1292671135
1
+ 1294225528
2
2
  Client /home/hassane/ruby_apps/louxewtey-client/lib/louxewtey/client.rb class Client
3
3
  LouXewTey /home/hassane/ruby_apps/louxewtey-client/lib/louxewtey-client.rb module LouXewTey
4
4
  LouXewTey /home/hassane/ruby_apps/louxewtey-client/lib/louxewtey/client.rb module LouXewTey
5
5
  LouXewTey /home/hassane/ruby_apps/louxewtey-client/lib/louxewtey/configuration.rb module LouXewTey
6
6
  SERVEUR /home/hassane/ruby_apps/louxewtey-client/lib/louxewtey/configuration.rb SERVEUR =
7
7
  TestCase /home/hassane/ruby_apps/louxewtey-client/test/helper.rb class Test::Unit::TestCase
8
- TestLouxewteyClient /home/hassane/ruby_apps/louxewtey-client/test/test_louxewtey-client.rb class TestLouxewteyClient
9
8
  connect /home/hassane/ruby_apps/louxewtey-client/lib/louxewtey/client.rb def connect( api_key, auth_key )
10
9
  create_event /home/hassane/ruby_apps/louxewtey-client/lib/louxewtey/client.rb def create_event( event={} )
11
- get_list_of /home/hassane/ruby_apps/louxewtey-client/lib/louxewtey/client.rb def get_list_of( resource="", format="xml" )
10
+ get_list_of /home/hassane/ruby_apps/louxewtey-client/lib/louxewtey/client.rb def get_list_of( args = {} )
12
11
  initialize /home/hassane/ruby_apps/louxewtey-client/lib/louxewtey/client.rb def initialize( api_key=nil,auth_key=nil )
data/README.rdoc CHANGED
@@ -4,18 +4,47 @@ Client Ruby pour accéder et profiter des services de la plateforme LouXewTey.<b
4
4
  1 -> Créer une application sur le site LouXewTey.
5
5
  2 -> Récupérer les clés : API_KEY et AUTH_KEY
6
6
 
7
- Nous suivre Sur Twitter : @hassanemoustaph
7
+ == Installation
8
+
9
+ 1 -> gem install rest-client
10
+
11
+ 2 -> gem install louxewtey-client
12
+
13
+
14
+ == Exemples de code
15
+
16
+
17
+ require 'rubygems'
18
+
19
+ require 'louxewtey-client'
20
+
21
+ client = LouXewTey::Client.new
22
+ #Ancienne version
23
+ liste_events = client.get_list_of("evenements","xml")
24
+
25
+ #Mise à jour
26
+
27
+ liste_events = client.get_list_of(:resource => "evenements",:format => "xml", :type => "conference")
28
+
29
+ #les attributs :format et :type sont facultatifs. (xml par défaut pour le format, et "all" pour type)
30
+
31
+ puts liste_events
32
+
33
+ == Nouveautés de la version 0.1.1
34
+
35
+ Listes des types d'évenements :
36
+
37
+ - conference
38
+ - concert
39
+ - culture
40
+ - religion
41
+ - soiree
42
+
8
43
 
9
44
  == Contributing to louxewtey-client
10
45
 
11
- * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
12
- * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
13
- * Fork the project
14
- * Start a feature/bugfix branch
15
- * Commit and push until you are happy with your contribution
16
- * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
17
- * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
18
46
 
47
+ Nous suivre Sur Twitter :@hassanemoustaph
19
48
  == Copyright
20
49
 
21
50
  Copyright (c) 2010 Hassane Moustapha. See LICENSE.txt for
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
@@ -10,9 +10,14 @@ module LouXewTey
10
10
  return "c'est fait"
11
11
  end
12
12
  ####################################################################
13
- def get_list_of( resource="", format="xml" )
13
+ def get_list_of( args = {} )
14
+ return nil unless args[:resource]
15
+ resource = args[:resource].downcase
16
+ format = args[:format].nil? ? "xml" : args[:format].to_s
17
+ type = args[:type].nil? ? "" : "?type=#{args[:type].to_s}"
18
+ type = "?genre=#{args[:resource]}" if args[:resource].downcase == "hotels"
14
19
  if %w(evenements hotels).include?( resource )
15
- RestClient.get("#{SERVEUR}/#{resource}.#{format}")do |response,request|
20
+ RestClient.get("#{SERVEUR}/#{resource}.#{format}#{type}")do |response,request|
16
21
  return response.body if response.code.to_i == 200
17
22
  end
18
23
  end
Binary file
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: louxewtey-client
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
5
- prerelease: false
4
+ hash: 25
5
+ prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 0
10
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Hassane Moustapha
@@ -15,13 +15,10 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-12-18 00:00:00 +00:00
18
+ date: 2011-01-05 00:00:00 +00:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
- type: :development
23
- prerelease: false
24
- name: rest-client
25
22
  version_requirements: &id001 !ruby/object:Gem::Requirement
26
23
  none: false
27
24
  requirements:
@@ -32,10 +29,10 @@ dependencies:
32
29
  - 0
33
30
  version: "0"
34
31
  requirement: *id001
35
- - !ruby/object:Gem::Dependency
36
- type: :development
37
32
  prerelease: false
38
- name: shoulda
33
+ name: rest-client
34
+ type: :development
35
+ - !ruby/object:Gem::Dependency
39
36
  version_requirements: &id002 !ruby/object:Gem::Requirement
40
37
  none: false
41
38
  requirements:
@@ -46,10 +43,10 @@ dependencies:
46
43
  - 0
47
44
  version: "0"
48
45
  requirement: *id002
49
- - !ruby/object:Gem::Dependency
50
- type: :development
51
46
  prerelease: false
52
- name: bundler
47
+ name: shoulda
48
+ type: :development
49
+ - !ruby/object:Gem::Dependency
53
50
  version_requirements: &id003 !ruby/object:Gem::Requirement
54
51
  none: false
55
52
  requirements:
@@ -62,10 +59,10 @@ dependencies:
62
59
  - 0
63
60
  version: 1.0.0
64
61
  requirement: *id003
65
- - !ruby/object:Gem::Dependency
66
- type: :development
67
62
  prerelease: false
68
- name: jeweler
63
+ name: bundler
64
+ type: :development
65
+ - !ruby/object:Gem::Dependency
69
66
  version_requirements: &id004 !ruby/object:Gem::Requirement
70
67
  none: false
71
68
  requirements:
@@ -78,10 +75,10 @@ dependencies:
78
75
  - 1
79
76
  version: 1.5.1
80
77
  requirement: *id004
81
- - !ruby/object:Gem::Dependency
82
- type: :development
83
78
  prerelease: false
84
- name: rcov
79
+ name: jeweler
80
+ type: :development
81
+ - !ruby/object:Gem::Dependency
85
82
  version_requirements: &id005 !ruby/object:Gem::Requirement
86
83
  none: false
87
84
  requirements:
@@ -92,6 +89,9 @@ dependencies:
92
89
  - 0
93
90
  version: "0"
94
91
  requirement: *id005
92
+ prerelease: false
93
+ name: rcov
94
+ type: :development
95
95
  description: " Client Ruby pour acc\xC3\xA9der et profiter des services de la plateforme LouXewTey. "
96
96
  email: hassanemoustapha@gmail.com
97
97
  executables: []
@@ -113,6 +113,7 @@ files:
113
113
  - lib/louxewtey-client.rb
114
114
  - lib/louxewtey/client.rb
115
115
  - lib/louxewtey/configuration.rb
116
+ - louxewtey-client-0.1.0.gem
116
117
  - test/helper.rb
117
118
  - test/test_louxewtey-client.rb
118
119
  has_rdoc: true
@@ -145,7 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
145
146
  requirements: []
146
147
 
147
148
  rubyforge_project:
148
- rubygems_version: 1.3.7
149
+ rubygems_version: 1.4.1
149
150
  signing_key:
150
151
  specification_version: 3
151
152
  summary: LouXewTey Ruby Client