Class: DeviceV3Client

Inherits:
Object
  • Object
show all
Defined in:
lib/mobpush/client/device/device_v3_client.rb

Class Attribute Summary collapse

Instance Method Summary collapse

Class Attribute Details

.GET_BY_ALIASObject

Returns the value of attribute GET_BY_ALIAS.



15
16
17
# File 'lib/mobpush/client/device/device_v3_client.rb', line 15

def GET_BY_ALIAS
  @GET_BY_ALIAS
end

.GET_BY_RIDObject

Returns the value of attribute GET_BY_RID.



15
16
17
# File 'lib/mobpush/client/device/device_v3_client.rb', line 15

def GET_BY_RID
  @GET_BY_RID
end

.GET_DEVICE_DISTRIBUTIONObject

Returns the value of attribute GET_DEVICE_DISTRIBUTION.



15
16
17
# File 'lib/mobpush/client/device/device_v3_client.rb', line 15

def GET_DEVICE_DISTRIBUTION
  @GET_DEVICE_DISTRIBUTION
end

.QUERY_BY_TAGSObject

Returns the value of attribute QUERY_BY_TAGS.



15
16
17
# File 'lib/mobpush/client/device/device_v3_client.rb', line 15

def QUERY_BY_TAGS
  @QUERY_BY_TAGS
end

.UPDATE_ALIASObject

Returns the value of attribute UPDATE_ALIAS.



15
16
17
# File 'lib/mobpush/client/device/device_v3_client.rb', line 15

def UPDATE_ALIAS
  @UPDATE_ALIAS
end

.UPDATE_TAGSObject

Returns the value of attribute UPDATE_TAGS.



15
16
17
# File 'lib/mobpush/client/device/device_v3_client.rb', line 15

def UPDATE_TAGS
  @UPDATE_TAGS
end

Instance Method Details

#getByRid(registrationId) ⇒ Object



18
19
20
21
22
# File 'lib/mobpush/client/device/device_v3_client.rb', line 18

def getByRid(registrationId)
    params = {:registrationId => registrationId}
    url = MobPushConfig.baseUrl + DeviceV3Client.GET_BY_RID + registrationId
    MobHTTP.get(url, nil, params)
end

#getDeviceDistributionObject



24
25
26
27
# File 'lib/mobpush/client/device/device_v3_client.rb', line 24

def getDeviceDistribution()
    url = MobPushConfig.baseUrl + DeviceV3Client.GET_DEVICE_DISTRIBUTION
    MobHTTP.get(url, nil, {})
end

#queryByAlias(_alias) ⇒ Object



29
30
31
32
33
# File 'lib/mobpush/client/device/device_v3_client.rb', line 29

def queryByAlias(_alias)
    params = {:alias => _alias}
    url = MobPushConfig.baseUrl + DeviceV3Client.GET_BY_ALIAS + _alias
    MobHTTP.get(url, nil, params)
end

#queryByTags(tags) ⇒ Object



47
48
49
50
51
# File 'lib/mobpush/client/device/device_v3_client.rb', line 47

def queryByTags(tags)
    params = {:tags => tags}
    url = MobPushConfig.baseUrl + DeviceV3Client.QUERY_BY_TAGS
    MobHTTP.post(url, nil, params)
end

#updateAlias(_alias, registrationId) ⇒ Object



35
36
37
38
39
# File 'lib/mobpush/client/device/device_v3_client.rb', line 35

def updateAlias(_alias, registrationId)
    params = {:alias => _alias, :registrationId => registrationId}
    url = MobPushConfig.baseUrl + DeviceV3Client.UPDATE_ALIAS
    MobHTTP.post(url, nil, params)
end

#updateTags(tags, registrationId, opType) ⇒ Object



41
42
43
44
45
# File 'lib/mobpush/client/device/device_v3_client.rb', line 41

def updateTags(tags, registrationId, opType)
    params = {:tags => tags, :registrationId => registrationId, :opType => opType}
    url = MobPushConfig.baseUrl + DeviceV3Client.UPDATE_TAGS
    MobHTTP.post(url, nil, params)
end