Sha256: f9a41ec1c1bafa43858e342e4dcb0d65003a8570531d99f56fc2a57da233d030

Contents?: true

Size: 610 Bytes

Versions: 30

Compression:

Stored size: 610 Bytes

Contents

class Auth::Endpoint
	
	include Mongoid::Document
		
	field :android_endpoint, type: String
	field :ios_endpoint, type: String
	field :android_token, type: String
	field :ios_token, type: String

	def set_android_endpoint
		
		return unless self.android_token
		
		return if self.android_endpoint
		
		if response = $sns_client.create_platform_endpoint(platform_application_arn: ENV["ANDROID_ARN"], token: self.android_token, attributes: {})
			self.android_endpoint = response.endpoint_arn
		
			self.android_endpoint
		else
		
			nil
		end
	end

	def set_ios_endpoint
		return unless self.ios_token
	end

end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
wordjelly-auth-1.6.0 app/models/auth/endpoint.rb
wordjelly-auth-1.5.9 app/models/auth/endpoint.rb
wordjelly-auth-1.5.8 app/models/auth/endpoint.rb
wordjelly-auth-1.5.7 app/models/auth/endpoint.rb
wordjelly-auth-1.5.6 app/models/auth/endpoint.rb
wordjelly-auth-1.5.5 app/models/auth/endpoint.rb
wordjelly-auth-1.5.4 app/models/auth/endpoint.rb
wordjelly-auth-1.5.3 app/models/auth/endpoint.rb
wordjelly-auth-1.5.2 app/models/auth/endpoint.rb
wordjelly-auth-1.5.1 app/models/auth/endpoint.rb
wordjelly-auth-1.5.0 app/models/auth/endpoint.rb
wordjelly-auth-1.4.9 app/models/auth/endpoint.rb
wordjelly-auth-1.4.8 app/models/auth/endpoint.rb
wordjelly-auth-1.4.7 app/models/auth/endpoint.rb
wordjelly-auth-1.4.6 app/models/auth/endpoint.rb
wordjelly-auth-1.4.5 app/models/auth/endpoint.rb
wordjelly-auth-1.4.4 app/models/auth/endpoint.rb
wordjelly-auth-1.4.3 app/models/auth/endpoint.rb
wordjelly-auth-1.4.2 app/models/auth/endpoint.rb
wordjelly-auth-1.4.0 app/models/auth/endpoint.rb