Module: NewEden::Character
- Included in:
- Connection
- Defined in:
- lib/neweden/character.rb
Constant Summary collapse
- CHARACTER_ENDPOINTS =
%w{ AccountBalance AssetList CharacterSheet ContactList ContactNotifications Contracts FacWarStats IndustryJobs Killlog MailBodies MailingLists MailMessages MarketOrders Medals Notifications Research SkillinTraining SkillQueue Standings WalletJournal WalletTransactions }
Instance Method Summary collapse
- #all_notification_texts(character_id) ⇒ Object
- #calendar_event_attendees(character_id) ⇒ Object
- #notification_texts(character_id, *notification_ids) ⇒ Object
- #upcoming_calendar_events(character_id) ⇒ Object
Instance Method Details
#all_notification_texts(character_id) ⇒ Object
20 21 22 23 24 25 26 27 28 |
# File 'lib/neweden/character.rb', line 20 def all_notification_texts(character_id) n_results = self.notifications(character_id) if n_results[:rowset][:row].nil? nil else notification_ids = n_results[:rowset][:row].map { |row| row[:notificationID] } notification_texts(character_id, notification_ids) end end |
#calendar_event_attendees(character_id) ⇒ Object
30 31 32 33 |
# File 'lib/neweden/character.rb', line 30 def calendar_event_attendees(character_id) upcoming_calendar_events(character_id) character_request("/char/CalendarEventAttendees.xml.aspx", character_id) end |
#notification_texts(character_id, *notification_ids) ⇒ Object
16 17 18 |
# File 'lib/neweden/character.rb', line 16 def notification_texts(character_id, *notification_ids) request("/char/NotificationTexts.xml.aspx", :post, :characterID => character_id, :IDs => notification_ids.map { |nid| nid.to_s }.join(',')) end |
#upcoming_calendar_events(character_id) ⇒ Object
35 36 37 38 |
# File 'lib/neweden/character.rb', line 35 def upcoming_calendar_events(character_id) @upcoming_events ||= {} @upcoming_events[character_id.to_s] ||= character_request("/char/UpcomingCalendarEvents.xml.aspx", character_id) end |