This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class DevicesController < ApplicationController | |
| before_filter :authenticate_user! | |
| def create | |
| @device = current_user.app.devices.new(registration_id: params[:registration_id]) | |
| if params[:platform] && params[:platform].upcase == 'IOS' | |
| @device.os = :ios | |
| end | |
| if @device.save |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class CategoriesController < ApplicationController | |
| respond_to :html, :json | |
| before_filter :find, :only => [:edit, :update, :destroy] | |
| def index | |
| parent = load_node_from_params | |
| @nodes = parent.descendants.categories.sort | |
| respond_with @nodes.to_a, :api_template => :basic | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # this goes into config/initializers/fog.rb | |
| CONN = Fog::Storage.new({ | |
| :provider => 'AWS', | |
| :aws_access_key_id => 'ACCESS_KEY', | |
| :aws_secret_access_key => 'SECRET_KEY_HERE' | |
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # this is where call session is started from but the parameter hash does | |
| # contain the required key / values | |
| def startCallSession(data) | |
| @current_call.callSessionId = data['sessionId'] | |
| updateCallStatus('call started') | |
| callScreen = InCallScreen.new(nav_bar: false, modal: true) | |
| callScreen.connectWith(data['sessionId'], andToken: data['token']) | |
| callScreen.client_time_available = data['fromSecondsAvailable'] | |
| App.delegate.presentModal(callScreen) | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Object tracking annotations are returned as a objectAnnotations list. | |
| { | |
| "name": "projects/PROJECT_NUMBER/locations/LOCATION_ID/operations/OPERATION_ID", | |
| "metadata": { | |
| "@type": "type.googleapis.com/google.cloud.videointelligence.v1.AnnotateVideoProgress", | |
| "annotationProgress": [ | |
| { | |
| "inputUri": "/cloud-ml-sandbox/video/chicago.mp4", | |
| "progressPercent": 100, | |
| "startTime": "2019-12-21T16:56:46.755199Z", |
OlderNewer