the-city-admin 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (125) hide show
  1. data/lib/api/address.rb +51 -0
  2. data/lib/api/address_list.rb +62 -0
  3. data/lib/api/api_object.rb +100 -0
  4. data/lib/api/barcode.rb +43 -0
  5. data/lib/api/checkin.rb +37 -0
  6. data/lib/api/checkin_list.rb +62 -0
  7. data/lib/api/family.rb +47 -0
  8. data/lib/api/family_member.rb +28 -0
  9. data/lib/api/group.rb +162 -0
  10. data/lib/api/group_address.rb +31 -0
  11. data/lib/api/group_address_list.rb +63 -0
  12. data/lib/api/group_checkin.rb +36 -0
  13. data/lib/api/group_checkin_list.rb +63 -0
  14. data/lib/api/group_event_attendance.rb +28 -0
  15. data/lib/api/group_event_attendance_list.rb +63 -0
  16. data/lib/api/group_export.rb +22 -0
  17. data/lib/api/group_export_list.rb +63 -0
  18. data/lib/api/group_invitation.rb +26 -0
  19. data/lib/api/group_invitation_list.rb +63 -0
  20. data/lib/api/group_list.rb +74 -0
  21. data/lib/api/group_role.rb +27 -0
  22. data/lib/api/group_role_list.rb +62 -0
  23. data/lib/api/group_tag.rb +20 -0
  24. data/lib/api/group_tag_list.rb +62 -0
  25. data/lib/api/metric.rb +50 -0
  26. data/lib/api/metric_list.rb +72 -0
  27. data/lib/api/metric_measurement.rb +29 -0
  28. data/lib/api/metric_measurement_list.rb +62 -0
  29. data/lib/api/role.rb +43 -0
  30. data/lib/api/role_list.rb +73 -0
  31. data/lib/api/skill.rb +21 -0
  32. data/lib/api/skill_list.rb +73 -0
  33. data/lib/api/skilled_user_id_list.rb +73 -0
  34. data/lib/api/skilled_user_list.rb +73 -0
  35. data/lib/api/tag.rb +32 -0
  36. data/lib/api/tag_group_list.rb +73 -0
  37. data/lib/api/tag_list.rb +73 -0
  38. data/lib/api/terminology.rb +32 -0
  39. data/lib/api/terminology_list.rb +73 -0
  40. data/lib/api/user.rb +207 -0
  41. data/lib/api/user_address.rb +31 -0
  42. data/lib/api/user_address_list.rb +62 -0
  43. data/lib/api/user_admin_privilege.rb +28 -0
  44. data/lib/api/user_admin_privilege_list.rb +63 -0
  45. data/lib/api/user_barcode.rb +20 -0
  46. data/lib/api/user_count.rb +40 -0
  47. data/lib/api/user_family_list.rb +71 -0
  48. data/lib/api/user_family_member.rb +28 -0
  49. data/lib/api/user_invitation.rb +26 -0
  50. data/lib/api/user_invitation_list.rb +63 -0
  51. data/lib/api/user_list.rb +72 -0
  52. data/lib/api/user_note.rb +31 -0
  53. data/lib/api/user_note_list.rb +63 -0
  54. data/lib/api/user_process.rb +21 -0
  55. data/lib/api/user_process_list.rb +63 -0
  56. data/lib/api/user_role.rb +34 -0
  57. data/lib/api/user_role_list.rb +74 -0
  58. data/lib/api/user_skill.rb +22 -0
  59. data/lib/api/user_skill_list.rb +74 -0
  60. data/lib/api/web_hook.rb +34 -0
  61. data/lib/api/web_hook_list.rb +74 -0
  62. data/lib/auto_load.rb +23 -0
  63. data/lib/cachers/cache_adapter.rb +50 -0
  64. data/lib/cachers/file/json_cache.rb +135 -0
  65. data/lib/common.rb +124 -0
  66. data/lib/exceptions.rb +5 -0
  67. data/lib/readers/address_list_reader.rb +21 -0
  68. data/lib/readers/address_reader.rb +22 -0
  69. data/lib/readers/api_reader.rb +28 -0
  70. data/lib/readers/checkin_list_reader.rb +21 -0
  71. data/lib/readers/checkin_reader.rb +22 -0
  72. data/lib/readers/family_reader.rb +21 -0
  73. data/lib/readers/group_address_list_reader.rb +25 -0
  74. data/lib/readers/group_checkin_list_reader.rb +25 -0
  75. data/lib/readers/group_event_attendance_list_reader.rb +25 -0
  76. data/lib/readers/group_export_list_reader.rb +25 -0
  77. data/lib/readers/group_invitation_list_reader.rb +23 -0
  78. data/lib/readers/group_list_reader.rb +25 -0
  79. data/lib/readers/group_reader.rb +21 -0
  80. data/lib/readers/group_role_list_reader.rb +23 -0
  81. data/lib/readers/group_tag_list_reader.rb +23 -0
  82. data/lib/readers/metric_list_reader.rb +22 -0
  83. data/lib/readers/metric_measurement_list_reader.rb +21 -0
  84. data/lib/readers/metric_measurement_reader.rb +22 -0
  85. data/lib/readers/metric_reader.rb +21 -0
  86. data/lib/readers/role_list_reader.rb +21 -0
  87. data/lib/readers/skill_list_reader.rb +21 -0
  88. data/lib/readers/skilled_user_id_list_reader.rb +22 -0
  89. data/lib/readers/skilled_user_list_reader.rb +22 -0
  90. data/lib/readers/tag_group_list_reader.rb +22 -0
  91. data/lib/readers/tag_list_reader.rb +22 -0
  92. data/lib/readers/tag_reader.rb +22 -0
  93. data/lib/readers/terminology_list_reader.rb +22 -0
  94. data/lib/readers/terminology_reader.rb +22 -0
  95. data/lib/readers/user_address_list_reader.rb +25 -0
  96. data/lib/readers/user_admin_privilege_list_reader.rb +23 -0
  97. data/lib/readers/user_count_reader.rb +32 -0
  98. data/lib/readers/user_family_list_reader.rb +24 -0
  99. data/lib/readers/user_invitation_list_reader.rb +23 -0
  100. data/lib/readers/user_list_reader.rb +25 -0
  101. data/lib/readers/user_note_list_reader.rb +23 -0
  102. data/lib/readers/user_process_list_reader.rb +23 -0
  103. data/lib/readers/user_reader.rb +24 -0
  104. data/lib/readers/user_role_list_reader.rb +23 -0
  105. data/lib/readers/user_skill_list_reader.rb +23 -0
  106. data/lib/readers/web_hook_list_reader.rb +21 -0
  107. data/lib/the_city_admin.rb +82 -0
  108. data/lib/writers/api_writer.rb +54 -0
  109. data/lib/writers/family_writer.rb +25 -0
  110. data/lib/writers/group_address_writer.rb +32 -0
  111. data/lib/writers/group_writer.rb +25 -0
  112. data/lib/writers/metric_measurement_writer.rb +25 -0
  113. data/lib/writers/metric_writer.rb +29 -0
  114. data/lib/writers/skill_writer.rb +25 -0
  115. data/lib/writers/tag_writer.rb +27 -0
  116. data/lib/writers/terminology_writer.rb +19 -0
  117. data/lib/writers/user_address_writer.rb +32 -0
  118. data/lib/writers/user_admin_privilege_writer.rb +24 -0
  119. data/lib/writers/user_invitation_writer.rb +23 -0
  120. data/lib/writers/user_note_writer.rb +25 -0
  121. data/lib/writers/user_role_writer.rb +28 -0
  122. data/lib/writers/user_skill_writer.rb +23 -0
  123. data/lib/writers/user_writer.rb +46 -0
  124. data/lib/writers/web_hook_writer.rb +20 -0
  125. metadata +184 -0
@@ -0,0 +1,20 @@
1
+ module TheCity
2
+
3
+ class WebHookWriter < ApiWriter
4
+
5
+ # Constructor.
6
+ #
7
+ # @param data The json object data to save.
8
+ def initialize(data)
9
+ @url_action = :post
10
+ @url_data_path = "/webhooks"
11
+ @url_data_delete_path = "/webhooks/#{data[:id]}"
12
+
13
+ @url_data_params = data
14
+ end
15
+
16
+ end
17
+
18
+ end
19
+
20
+
metadata ADDED
@@ -0,0 +1,184 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: the-city-admin
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Wes Hays
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-08-26 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: typhoeus
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ description: Ruby gem/plugin to interact with The City Admin API (http://api.OnTheCity.org).
31
+ email: wes@onthecity.org
32
+ executables: []
33
+ extensions: []
34
+ extra_rdoc_files: []
35
+ files:
36
+ - lib/api/address.rb
37
+ - lib/api/address_list.rb
38
+ - lib/api/api_object.rb
39
+ - lib/api/barcode.rb
40
+ - lib/api/checkin.rb
41
+ - lib/api/checkin_list.rb
42
+ - lib/api/family.rb
43
+ - lib/api/family_member.rb
44
+ - lib/api/group.rb
45
+ - lib/api/group_address.rb
46
+ - lib/api/group_address_list.rb
47
+ - lib/api/group_checkin.rb
48
+ - lib/api/group_checkin_list.rb
49
+ - lib/api/group_event_attendance.rb
50
+ - lib/api/group_event_attendance_list.rb
51
+ - lib/api/group_export.rb
52
+ - lib/api/group_export_list.rb
53
+ - lib/api/group_invitation.rb
54
+ - lib/api/group_invitation_list.rb
55
+ - lib/api/group_list.rb
56
+ - lib/api/group_role.rb
57
+ - lib/api/group_role_list.rb
58
+ - lib/api/group_tag.rb
59
+ - lib/api/group_tag_list.rb
60
+ - lib/api/metric.rb
61
+ - lib/api/metric_list.rb
62
+ - lib/api/metric_measurement.rb
63
+ - lib/api/metric_measurement_list.rb
64
+ - lib/api/role.rb
65
+ - lib/api/role_list.rb
66
+ - lib/api/skill.rb
67
+ - lib/api/skill_list.rb
68
+ - lib/api/skilled_user_id_list.rb
69
+ - lib/api/skilled_user_list.rb
70
+ - lib/api/tag.rb
71
+ - lib/api/tag_group_list.rb
72
+ - lib/api/tag_list.rb
73
+ - lib/api/terminology.rb
74
+ - lib/api/terminology_list.rb
75
+ - lib/api/user.rb
76
+ - lib/api/user_address.rb
77
+ - lib/api/user_address_list.rb
78
+ - lib/api/user_admin_privilege.rb
79
+ - lib/api/user_admin_privilege_list.rb
80
+ - lib/api/user_barcode.rb
81
+ - lib/api/user_count.rb
82
+ - lib/api/user_family_list.rb
83
+ - lib/api/user_family_member.rb
84
+ - lib/api/user_invitation.rb
85
+ - lib/api/user_invitation_list.rb
86
+ - lib/api/user_list.rb
87
+ - lib/api/user_note.rb
88
+ - lib/api/user_note_list.rb
89
+ - lib/api/user_process.rb
90
+ - lib/api/user_process_list.rb
91
+ - lib/api/user_role.rb
92
+ - lib/api/user_role_list.rb
93
+ - lib/api/user_skill.rb
94
+ - lib/api/user_skill_list.rb
95
+ - lib/api/web_hook.rb
96
+ - lib/api/web_hook_list.rb
97
+ - lib/auto_load.rb
98
+ - lib/cachers/cache_adapter.rb
99
+ - lib/cachers/file/json_cache.rb
100
+ - lib/common.rb
101
+ - lib/exceptions.rb
102
+ - lib/readers/address_list_reader.rb
103
+ - lib/readers/address_reader.rb
104
+ - lib/readers/api_reader.rb
105
+ - lib/readers/checkin_list_reader.rb
106
+ - lib/readers/checkin_reader.rb
107
+ - lib/readers/family_reader.rb
108
+ - lib/readers/group_address_list_reader.rb
109
+ - lib/readers/group_checkin_list_reader.rb
110
+ - lib/readers/group_event_attendance_list_reader.rb
111
+ - lib/readers/group_export_list_reader.rb
112
+ - lib/readers/group_invitation_list_reader.rb
113
+ - lib/readers/group_list_reader.rb
114
+ - lib/readers/group_reader.rb
115
+ - lib/readers/group_role_list_reader.rb
116
+ - lib/readers/group_tag_list_reader.rb
117
+ - lib/readers/metric_list_reader.rb
118
+ - lib/readers/metric_measurement_list_reader.rb
119
+ - lib/readers/metric_measurement_reader.rb
120
+ - lib/readers/metric_reader.rb
121
+ - lib/readers/role_list_reader.rb
122
+ - lib/readers/skill_list_reader.rb
123
+ - lib/readers/skilled_user_id_list_reader.rb
124
+ - lib/readers/skilled_user_list_reader.rb
125
+ - lib/readers/tag_group_list_reader.rb
126
+ - lib/readers/tag_list_reader.rb
127
+ - lib/readers/tag_reader.rb
128
+ - lib/readers/terminology_list_reader.rb
129
+ - lib/readers/terminology_reader.rb
130
+ - lib/readers/user_address_list_reader.rb
131
+ - lib/readers/user_admin_privilege_list_reader.rb
132
+ - lib/readers/user_count_reader.rb
133
+ - lib/readers/user_family_list_reader.rb
134
+ - lib/readers/user_invitation_list_reader.rb
135
+ - lib/readers/user_list_reader.rb
136
+ - lib/readers/user_note_list_reader.rb
137
+ - lib/readers/user_process_list_reader.rb
138
+ - lib/readers/user_reader.rb
139
+ - lib/readers/user_role_list_reader.rb
140
+ - lib/readers/user_skill_list_reader.rb
141
+ - lib/readers/web_hook_list_reader.rb
142
+ - lib/the_city_admin.rb
143
+ - lib/writers/api_writer.rb
144
+ - lib/writers/family_writer.rb
145
+ - lib/writers/group_address_writer.rb
146
+ - lib/writers/group_writer.rb
147
+ - lib/writers/metric_measurement_writer.rb
148
+ - lib/writers/metric_writer.rb
149
+ - lib/writers/skill_writer.rb
150
+ - lib/writers/tag_writer.rb
151
+ - lib/writers/terminology_writer.rb
152
+ - lib/writers/user_address_writer.rb
153
+ - lib/writers/user_admin_privilege_writer.rb
154
+ - lib/writers/user_invitation_writer.rb
155
+ - lib/writers/user_note_writer.rb
156
+ - lib/writers/user_role_writer.rb
157
+ - lib/writers/user_skill_writer.rb
158
+ - lib/writers/user_writer.rb
159
+ - lib/writers/web_hook_writer.rb
160
+ homepage: https://github.com/thecity/thecity-admin-ruby
161
+ licenses: []
162
+ post_install_message:
163
+ rdoc_options: []
164
+ require_paths:
165
+ - lib
166
+ required_ruby_version: !ruby/object:Gem::Requirement
167
+ none: false
168
+ requirements:
169
+ - - ! '>='
170
+ - !ruby/object:Gem::Version
171
+ version: '0'
172
+ required_rubygems_version: !ruby/object:Gem::Requirement
173
+ none: false
174
+ requirements:
175
+ - - ! '>='
176
+ - !ruby/object:Gem::Version
177
+ version: '0'
178
+ requirements: []
179
+ rubyforge_project: Project on www.github.com
180
+ rubygems_version: 1.8.24
181
+ signing_key:
182
+ specification_version: 3
183
+ summary: Ruby gem/plugin to interact with The City Admin API (http://api.OnTheCity.org).
184
+ test_files: []