Class: Renren2::Interface::Checkins

Inherits:
Base
  • Object
show all
Defined in:
lib/renren2/interface/checkins.rb

Overview

Checkins Interface

Instance Method Summary collapse

Methods inherited from Base

#check_scope, #get, #initialize, #post, #request

Constructor Details

This class inherits a constructor from Renren2::Interface::Base

Instance Method Details

#checkin(place_id, opts = {}) ⇒ Object

Note:

require “publish_checkin” scope

签到

Parameters:

  • place_id (String)

    签到地点的ID

  • opts (Hash) (defaults to: {})

Options Hash (opts):

  • :message (String)

    签到时发布的内容

  • :longitude (double)

    地点的经度,有效范围-180.0到+180.0,“+”表示东经

  • :latitude (double)

    地点的纬度,有效范围-90.0到+90.0,“+”表示北纬

  • :privacy (int)

    隐私设置。“0”表示所有人可见,“1”仅自己可见。默认“0”为所有人可见

See Also:



20
21
22
23
# File 'lib/renren2/interface/checkins.rb', line 20

def checkin(place_id, opts={})
  check_scope "publish_checkin"
  post 'checkins.checkin', :body => {:place_id => place_id}.merge(opts)
end