Class: Naviance::School
- Inherits:
-
Object
- Object
- Naviance::School
- Includes:
- HTTParty
- Defined in:
- lib/naviance/school.rb
Instance Attribute Summary (collapse)
-
- (Object) ceeb
readonly
Returns the value of attribute ceeb.
-
- (Object) city
readonly
Returns the value of attribute city.
-
- (Object) country
readonly
Returns the value of attribute country.
-
- (Object) name
readonly
Returns the value of attribute name.
-
- (Object) naviance_id
readonly
Returns the value of attribute naviance_id.
-
- (Object) state
readonly
Returns the value of attribute state.
Class Method Summary (collapse)
-
+ (Object) find(env, access_token, id)
Get School data from Naviance.
Instance Method Summary (collapse)
-
- (School) initialize(params)
constructor
:nodoc:.
Constructor Details
- (School) initialize(params)
:nodoc:
7 8 9 10 11 12 13 14 |
# File 'lib/naviance/school.rb', line 7 def initialize(params) # :nodoc: @naviance_id = params['naviance_school_id'] @name = params['name'] @city = params['city'] @state = params['state'] @country = params['country'] @ceeb = params['ceeb'] end |
Instance Attribute Details
- (Object) ceeb (readonly)
Returns the value of attribute ceeb
2 3 4 |
# File 'lib/naviance/school.rb', line 2 def ceeb @ceeb end |
- (Object) city (readonly)
Returns the value of attribute city
2 3 4 |
# File 'lib/naviance/school.rb', line 2 def city @city end |
- (Object) country (readonly)
Returns the value of attribute country
2 3 4 |
# File 'lib/naviance/school.rb', line 2 def country @country end |
- (Object) name (readonly)
Returns the value of attribute name
2 3 4 |
# File 'lib/naviance/school.rb', line 2 def name @name end |
- (Object) naviance_id (readonly)
Returns the value of attribute naviance_id
2 3 4 |
# File 'lib/naviance/school.rb', line 2 def naviance_id @naviance_id end |
- (Object) state (readonly)
Returns the value of attribute state
2 3 4 |
# File 'lib/naviance/school.rb', line 2 def state @state end |
Class Method Details
+ (Object) find(env, access_token, id)
Get School data from Naviance
Attributes
-
env - The environment you are working in sandbox or production. Also accepts corresponding Rails.env
-
access_token - A valid access token see Naviance::AccessToken#get
-
id - The Naviance ID of the school
23 24 25 |
# File 'lib/naviance/school.rb', line 23 def self.find(env, access_token, id) new(get("#{Naviance.base_url(env)}/school/#{id}?access_token=#{access_token}").parsed_response) end |