Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated endpoints/hooks for admin-api. #5

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .rvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
rvm ruby-1.9.2-p320@admin-api
rvm ruby-1.9.3-p392@admin-api
4 changes: 2 additions & 2 deletions examples/city_keys.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module CityKeys

KEY = 'cf2903151e3213e66fd8080c7d8b65b1d6ccdd31'
TOKEN = '5c88b32edda7653c'
KEY = '8d326a8d354fcdeb97cb2a7b83561ac654d4ad53'
TOKEN = '5a2aeeddac031b0a'

end
20 changes: 12 additions & 8 deletions lib/api/address.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,21 @@ module TheCity
class Address < ApiObject

tc_attr_accessor :city,
:created_at,
:id,
:created_at,
:latitude,
:updated_at,
:zipcode,
:group_id,
:group_external_id,
:id,
:street,
:street2,
:location_type,
:longitude,
:privacy,
:state,
:street,
:updated_at,
:group_id,
:zipcode
:longitude,
:state




# Loads the address by the specified ID.
Expand Down
30 changes: 12 additions & 18 deletions lib/api/donation.rb
Original file line number Diff line number Diff line change
@@ -1,25 +1,19 @@
module TheCity

class Donation < ApiObject
tc_attr_accessor :id,
:user_id,
:fund_id,
tc_attr_accessor :split_id,
:external_id,
:amount,
:id,
:date,
:note,
:instrument,
:state,
:batch_id,
:amount,
:instrument_type,
:donation_state,
:donation_date,
:created_at,
:updated_at,
:fund_name,
:primary_campus_id,
:user_name,
:user_type,
:user_api_url,
:user_is_member,
:spouse_id,
:spouse_name,
:spouse_is_member
:user,
:fund



# Loads the donation by the specified ID.
#
Expand Down
4 changes: 2 additions & 2 deletions lib/api/family.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ module TheCity

class Family < ApiObject

tc_attr_accessor :id,
tc_attr_accessor :created_at,
:external_id,
:created_at,
:id,
:family_members


Expand Down
20 changes: 11 additions & 9 deletions lib/api/fund.rb
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
module TheCity

class Fund < ApiObject
tc_attr_accessor :id,
:name,
:tax_deductible,
:group_id,
tc_attr_accessor :givable,
:pledge_inactive_date,
:fund_state,
:pledge_type,
:updated_at,
:created_at,
:pledge_state,
:pledge_inactive_date,
:pledge_type,
:campus_name,
:name,
:tax_deductible,
:pledge_description,
:online_givable,
:external_id,
:created_at,
:updated_at
:campus_id,
:id


# Loads the fund by the specified ID.
#
Expand Down
45 changes: 22 additions & 23 deletions lib/api/group.rb
Original file line number Diff line number Diff line change
@@ -1,36 +1,35 @@
module TheCity

class Group < ApiObject
tc_attr_accessor :campus_name,
:last_engaged,
:default_invitation_custom_message,
:archive_scheduled,
:time_zone,
:campus_id,
:group_type,
:parent_id,
:target_size,
:nearest_neighborhood_name,
tc_attr_accessor :name,
:admin_url,
:deletion_scheduled,
:plaza_url,
:updated_at,
:external_description,
:nickname,
:started_as_seed,
:unlisted,
:created_at,
:api_url,
:profile_pic,
:campus_name,
:nearest_neighborhood_id,
:started_as_seed,
:nickname,
:updated_at,
:inactive,
:target_size,
:internal_url,
:external_id,
:group_type,
:unlisted,
:id,
:secure,
:nearest_neighborhood_id,
:name,
:default_invitation_custom_message,
:nearest_neighborhood_name,
:last_engaged,
:plaza_url,
:parent_id,
:campus_id,
:archive_scheduled,
:time_zone,
:external_description,
:auto_approve_invites,
:id,
:external_id,
:user_ids
:deletion_scheduled,
:api_url


# Loads the group by the specified ID.
Expand Down
13 changes: 7 additions & 6 deletions lib/api/group_address.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@ class GroupAddress < ApiObject

tc_attr_accessor :city,
:created_at,
:id,
:latitude,
:updated_at,
:zipcode,
:id,
:street,
:street2,
:location_type,
:longitude,
:privacy,
:longitude,
:state,
:street,
:updated_at,
:group_id,
:zipcode

:group_external_id

# Constructor.
#
Expand Down
9 changes: 5 additions & 4 deletions lib/api/group_export.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ module TheCity

class GroupExport < ApiObject

tc_attr_accessor :id,
:group_id,
:state,
tc_attr_accessor :created_at,
:authenticated_s3_url,
:created_at
:id,
:state




# Loads the group export by the specified ID.
Expand Down
11 changes: 6 additions & 5 deletions lib/api/group_role.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@ module TheCity

class GroupRole < ApiObject

tc_attr_accessor :active,
:created_at,
:id,
:last_engaged,
tc_attr_accessor :created_at,
:title,
:user_api_url,
:id,
:user_type,
:user_id,
:last_engaged,
:user_name,
:user_type
:active



# Constructor.
Expand Down
8 changes: 4 additions & 4 deletions lib/api/metric.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
module TheCity

class Metric < ApiObject
tc_attr_accessor :id,
:name,
:description,
tc_attr_accessor :name,
:category,
:subcategory,
:is_percent
:id,
:is_percent,
:description


# Loads the metric by the specified ID.
Expand Down
4 changes: 2 additions & 2 deletions lib/api/metric_measurement.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ module TheCity

class MetricMeasurement < ApiObject

tc_attr_accessor :id,
:created_at,
tc_attr_accessor :created_at,
:id,
:value


Expand Down
19 changes: 5 additions & 14 deletions lib/api/pledge.rb
Original file line number Diff line number Diff line change
@@ -1,22 +1,13 @@
module TheCity

class Pledge < ApiObject
tc_attr_accessor :id,
:user_id,
:fund_id,
:amount,
:pledge_date,
tc_attr_accessor :amount,
:created_at,
:updated_at,
:fund_name,
:primary_campus_id,
:user_name,
:user_type,
:user_api_url,
:user_is_member,
:spouse_id,
:spouse_name,
:spouse_is_name
:fund_id,
:pledge_date,
:id,
:user_id


# Loads the pledge by the specified ID.
Expand Down
6 changes: 3 additions & 3 deletions lib/api/skill.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ module TheCity

class Skill < ApiObject

tc_attr_accessor :id,
:name,
:created_at
tc_attr_accessor :name,
:created_at,
:id

# Constructor.
#
Expand Down
6 changes: 3 additions & 3 deletions lib/api/tag.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ module TheCity

class Tag < ApiObject

tc_attr_accessor :id,
:name,
:created_at
tc_attr_accessor :name,
:created_at,
:id


# Loads the tag by the specified ID.
Expand Down
3 changes: 1 addition & 2 deletions lib/api/terminology.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ module TheCity

class Terminology < ApiObject

tc_attr_accessor :term,
:label
tc_attr_accessor :cg


# Loads the terminology by the specified term.
Expand Down
5 changes: 3 additions & 2 deletions lib/api/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ class User < ApiObject
:external_id_1,
:external_id_2,
:external_id_3,
:external_chms_id,
:middle,
:email,
:marital_status
:email



# Loads the user by the specified ID.
Expand Down
12 changes: 7 additions & 5 deletions lib/api/user_address.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,18 @@ class UserAddress < ApiObject

tc_attr_accessor :city,
:created_at,
:id,
:latitude,
:updated_at,
:zipcode,
:id,
:street,
:street2,
:location_type,
:longitude,
:privacy,
:longitude,
:state,
:street,
:updated_at,
:user_id,
:zipcode
:user_external_id


# Constructor.
Expand Down
4 changes: 2 additions & 2 deletions lib/api/user_barcode.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ module TheCity

class UserBarcode < ApiObject

tc_attr_accessor :id,
:barcode,
tc_attr_accessor :barcode,
:id,
:created_at

# Constructor.
Expand Down
Loading