Module: EyeEmConnector::Client::News

Included in:
EyeEmConnector::Client
Defined in:
lib/EyeEmConnector/models/news.rb

Instance Method Summary collapse

Instance Method Details

#mark_news_read(news_items) ⇒ Object

POST



27
28
29
# File 'lib/EyeEmConnector/models/news.rb', line 27

def mark_news_read(news_items) #news_items: ids as string, comma separated
  response = post('news',{:mark_as_read => news_items},true)
end

#mark_single_news_read(id, options = {}) ⇒ Object

PUT



21
22
23
# File 'lib/EyeEmConnector/models/news.rb', line 21

def mark_single_news_read(id,options={})
  response = put("news/#{id}",options,true)
end

#news(options = {}) ⇒ Object

GET



9
10
11
12
# File 'lib/EyeEmConnector/models/news.rb', line 9

def news(options={}) #access token required
  response = get('news',options)
  response.body
end

#single_news(id, options = {}) ⇒ Object

access token required



14
15
16
17
# File 'lib/EyeEmConnector/models/news.rb', line 14

def single_news(id,options={}) #access token required
  response = get("news/#{id}",options)
  response.body
end