uiza 1.1.1 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/CHANGELOG.md +4 -0
 - data/Gemfile.lock +1 -1
 - data/README.md +21 -53
 - data/doc/CALLBACK.md +77 -39
 - data/doc/CATEGORY.md +202 -104
 - data/doc/ENTITY.md +295 -200
 - data/doc/LIVE.md +513 -0
 - data/doc/STORAGE.md +123 -66
 - data/doc/USER.md +114 -194
 - data/lib/uiza.rb +9 -2
 - data/lib/uiza/api_operation/add.rb +2 -1
 - data/lib/uiza/api_operation/create.rb +2 -1
 - data/lib/uiza/api_operation/delete.rb +2 -2
 - data/lib/uiza/api_operation/list.rb +3 -1
 - data/lib/uiza/api_operation/remove.rb +2 -2
 - data/lib/uiza/api_operation/retrieve.rb +2 -2
 - data/lib/uiza/api_operation/update.rb +2 -1
 - data/lib/uiza/callback.rb +4 -4
 - data/lib/uiza/category.rb +11 -9
 - data/lib/uiza/entity.rb +17 -17
 - data/lib/uiza/live.rb +23 -22
 - data/lib/uiza/storage.rb +4 -4
 - data/lib/uiza/user.rb +14 -15
 - data/lib/uiza/version.rb +1 -1
 - metadata +3 -5
 - data/doc/ANALYTIC.md +0 -143
 - data/doc/LIVE_STREAMING.md +0 -435
 - data/lib/uiza/analytic.rb +0 -42
 
    
        data/doc/LIVE.md
    ADDED
    
    | 
         @@ -0,0 +1,513 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            ## Live Streaming
         
     | 
| 
      
 2 
     | 
    
         
            +
            These APIs used to create and manage live streaming event.
         
     | 
| 
      
 3 
     | 
    
         
            +
            * When a Live is not start : it's named as `Event`.
         
     | 
| 
      
 4 
     | 
    
         
            +
            * When have an Event , you can start it : it's named as `Feed`.
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
            See details [here](https://docs.uiza.io/v4/#live-streaming).
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
            ## Create a live event
         
     | 
| 
      
 9 
     | 
    
         
            +
            These APIs use to create a live streaming and manage the live streaming input (output).
         
     | 
| 
      
 10 
     | 
    
         
            +
            A live stream can be set up and start later or start right after set up.
         
     | 
| 
      
 11 
     | 
    
         
            +
            Live Channel Minutes counts when the event starts.
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
            See details [here](https://docs.uiza.io/v4/#create-a-live-event).
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
            ```ruby
         
     | 
| 
      
 16 
     | 
    
         
            +
            require "uiza"
         
     | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
      
 18 
     | 
    
         
            +
            Uiza.app_id = "your-app-id"
         
     | 
| 
      
 19 
     | 
    
         
            +
            Uiza.authorization = "your-authorization"
         
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
      
 21 
     | 
    
         
            +
            params = {
         
     | 
| 
      
 22 
     | 
    
         
            +
              name: "Sample Event",
         
     | 
| 
      
 23 
     | 
    
         
            +
              mode: "push",
         
     | 
| 
      
 24 
     | 
    
         
            +
              resourceMode: "single",
         
     | 
| 
      
 25 
     | 
    
         
            +
              encode: 0,
         
     | 
| 
      
 26 
     | 
    
         
            +
              description: "This is a sample event"
         
     | 
| 
      
 27 
     | 
    
         
            +
            }
         
     | 
| 
      
 28 
     | 
    
         
            +
             
     | 
| 
      
 29 
     | 
    
         
            +
            begin
         
     | 
| 
      
 30 
     | 
    
         
            +
              live = Uiza::Live.create params
         
     | 
| 
      
 31 
     | 
    
         
            +
              puts live.id
         
     | 
| 
      
 32 
     | 
    
         
            +
              puts live.name
         
     | 
| 
      
 33 
     | 
    
         
            +
            rescue Uiza::Error::UizaError => e
         
     | 
| 
      
 34 
     | 
    
         
            +
              puts "description_link: #{e.description_link}"
         
     | 
| 
      
 35 
     | 
    
         
            +
              puts "code: #{e.code}"
         
     | 
| 
      
 36 
     | 
    
         
            +
              puts "message: #{e.message}"
         
     | 
| 
      
 37 
     | 
    
         
            +
            rescue StandardError => e
         
     | 
| 
      
 38 
     | 
    
         
            +
              puts "message: #{e.message}"
         
     | 
| 
      
 39 
     | 
    
         
            +
            end
         
     | 
| 
      
 40 
     | 
    
         
            +
            ```
         
     | 
| 
      
 41 
     | 
    
         
            +
             
     | 
| 
      
 42 
     | 
    
         
            +
            Example Response
         
     | 
| 
      
 43 
     | 
    
         
            +
            ```json
         
     | 
| 
      
 44 
     | 
    
         
            +
            {
         
     | 
| 
      
 45 
     | 
    
         
            +
              "data": {
         
     | 
| 
      
 46 
     | 
    
         
            +
                "id": "d956f4a2-a3a8-4c7d-a738-98e6b1433d70",
         
     | 
| 
      
 47 
     | 
    
         
            +
                "name": "Sample Event",
         
     | 
| 
      
 48 
     | 
    
         
            +
                "description": "This is a sample event",
         
     | 
| 
      
 49 
     | 
    
         
            +
                "mode": "push",
         
     | 
| 
      
 50 
     | 
    
         
            +
                "resourceMode": "single",
         
     | 
| 
      
 51 
     | 
    
         
            +
                "encode": 0,
         
     | 
| 
      
 52 
     | 
    
         
            +
                "channelName": "9a5a1280-1ccf-458d-a77c-85c0d17f7fb7",
         
     | 
| 
      
 53 
     | 
    
         
            +
                "lastPresetId": nil,
         
     | 
| 
      
 54 
     | 
    
         
            +
                "lastFeedId": nil,
         
     | 
| 
      
 55 
     | 
    
         
            +
                "poster": nil,
         
     | 
| 
      
 56 
     | 
    
         
            +
                "thumbnail": nil,
         
     | 
| 
      
 57 
     | 
    
         
            +
                "linkPublishSocial": nil,
         
     | 
| 
      
 58 
     | 
    
         
            +
                "linkStream": nil,
         
     | 
| 
      
 59 
     | 
    
         
            +
                "lastPullInfo": nil,
         
     | 
| 
      
 60 
     | 
    
         
            +
                "lastPushInfo": nil,
         
     | 
| 
      
 61 
     | 
    
         
            +
                "lastProcess": nil,
         
     | 
| 
      
 62 
     | 
    
         
            +
                "eventType": nil,
         
     | 
| 
      
 63 
     | 
    
         
            +
                "drm": 0,
         
     | 
| 
      
 64 
     | 
    
         
            +
                "dvr": 0,
         
     | 
| 
      
 65 
     | 
    
         
            +
                "createdAt": "2019-03-13T12:07:45.000Z",
         
     | 
| 
      
 66 
     | 
    
         
            +
                "updatedAt": "2019-03-13T12:07:45.000Z"
         
     | 
| 
      
 67 
     | 
    
         
            +
              },
         
     | 
| 
      
 68 
     | 
    
         
            +
              "version": 4,
         
     | 
| 
      
 69 
     | 
    
         
            +
              "datetime": "2019-03-13T12:07:45.342Z",
         
     | 
| 
      
 70 
     | 
    
         
            +
              "policy": "public",
         
     | 
| 
      
 71 
     | 
    
         
            +
              "requestId": "4f3db256-1bac-4ba4-90f0-83e8aa5bb403",
         
     | 
| 
      
 72 
     | 
    
         
            +
              "serviceName": "api-v4",
         
     | 
| 
      
 73 
     | 
    
         
            +
              "message": "OK",
         
     | 
| 
      
 74 
     | 
    
         
            +
              "code": 200,
         
     | 
| 
      
 75 
     | 
    
         
            +
              "type": "SUCCESS"
         
     | 
| 
      
 76 
     | 
    
         
            +
            }
         
     | 
| 
      
 77 
     | 
    
         
            +
            ```
         
     | 
| 
      
 78 
     | 
    
         
            +
             
     | 
| 
      
 79 
     | 
    
         
            +
            ## Retrieve a live event
         
     | 
| 
      
 80 
     | 
    
         
            +
            Retrieves the details of an existing event.
         
     | 
| 
      
 81 
     | 
    
         
            +
            You need only provide the unique identifier of event that was returned upon Live event creation.
         
     | 
| 
      
 82 
     | 
    
         
            +
             
     | 
| 
      
 83 
     | 
    
         
            +
            See details [here](https://docs.uiza.io/v4/#retrieve-a-live-event).
         
     | 
| 
      
 84 
     | 
    
         
            +
             
     | 
| 
      
 85 
     | 
    
         
            +
            ```ruby
         
     | 
| 
      
 86 
     | 
    
         
            +
            require "uiza"
         
     | 
| 
      
 87 
     | 
    
         
            +
             
     | 
| 
      
 88 
     | 
    
         
            +
            Uiza.app_id = "your-app-id"
         
     | 
| 
      
 89 
     | 
    
         
            +
            Uiza.authorization = "your-authorization"
         
     | 
| 
      
 90 
     | 
    
         
            +
             
     | 
| 
      
 91 
     | 
    
         
            +
            begin
         
     | 
| 
      
 92 
     | 
    
         
            +
              live = Uiza::Live.retrieve "your-live-id"
         
     | 
| 
      
 93 
     | 
    
         
            +
              puts live.id
         
     | 
| 
      
 94 
     | 
    
         
            +
              puts live.name
         
     | 
| 
      
 95 
     | 
    
         
            +
            rescue Uiza::Error::UizaError => e
         
     | 
| 
      
 96 
     | 
    
         
            +
              puts "description_link: #{e.description_link}"
         
     | 
| 
      
 97 
     | 
    
         
            +
              puts "code: #{e.code}"
         
     | 
| 
      
 98 
     | 
    
         
            +
              puts "message: #{e.message}"
         
     | 
| 
      
 99 
     | 
    
         
            +
            rescue StandardError => e
         
     | 
| 
      
 100 
     | 
    
         
            +
              puts "message: #{e.message}"
         
     | 
| 
      
 101 
     | 
    
         
            +
            end
         
     | 
| 
      
 102 
     | 
    
         
            +
            ```
         
     | 
| 
      
 103 
     | 
    
         
            +
             
     | 
| 
      
 104 
     | 
    
         
            +
            Example Response
         
     | 
| 
      
 105 
     | 
    
         
            +
            ```json
         
     | 
| 
      
 106 
     | 
    
         
            +
            {
         
     | 
| 
      
 107 
     | 
    
         
            +
              "data": {
         
     | 
| 
      
 108 
     | 
    
         
            +
                "id": "d956f4a2-a3a8-4c7d-a738-98e6b1433d70",
         
     | 
| 
      
 109 
     | 
    
         
            +
                "name": "Sample Event",
         
     | 
| 
      
 110 
     | 
    
         
            +
                "description": "This is a sample event",
         
     | 
| 
      
 111 
     | 
    
         
            +
                "mode": "push",
         
     | 
| 
      
 112 
     | 
    
         
            +
                "resourceMode": "single",
         
     | 
| 
      
 113 
     | 
    
         
            +
                "encode": 0,
         
     | 
| 
      
 114 
     | 
    
         
            +
                "channelName": "9a5a1280-1ccf-458d-a77c-85c0d17f7fb7",
         
     | 
| 
      
 115 
     | 
    
         
            +
                "lastPresetId": nil,
         
     | 
| 
      
 116 
     | 
    
         
            +
                "lastFeedId": nil,
         
     | 
| 
      
 117 
     | 
    
         
            +
                "poster": nil,
         
     | 
| 
      
 118 
     | 
    
         
            +
                "thumbnail": nil,
         
     | 
| 
      
 119 
     | 
    
         
            +
                "linkPublishSocial": nil,
         
     | 
| 
      
 120 
     | 
    
         
            +
                "linkStream": nil,
         
     | 
| 
      
 121 
     | 
    
         
            +
                "lastPullInfo": nil,
         
     | 
| 
      
 122 
     | 
    
         
            +
                "lastPushInfo": nil,
         
     | 
| 
      
 123 
     | 
    
         
            +
                "lastProcess": nil,
         
     | 
| 
      
 124 
     | 
    
         
            +
                "eventType": nil,
         
     | 
| 
      
 125 
     | 
    
         
            +
                "drm": 0,
         
     | 
| 
      
 126 
     | 
    
         
            +
                "dvr": 0,
         
     | 
| 
      
 127 
     | 
    
         
            +
                "createdAt": "2019-03-13T12:07:45.000Z",
         
     | 
| 
      
 128 
     | 
    
         
            +
                "updatedAt": "2019-03-13T12:07:45.000Z"
         
     | 
| 
      
 129 
     | 
    
         
            +
              },
         
     | 
| 
      
 130 
     | 
    
         
            +
              "version": 4,
         
     | 
| 
      
 131 
     | 
    
         
            +
              "datetime": "2019-03-13T12:07:45.342Z",
         
     | 
| 
      
 132 
     | 
    
         
            +
              "policy": "public",
         
     | 
| 
      
 133 
     | 
    
         
            +
              "requestId": "4f3db256-1bac-4ba4-90f0-83e8aa5bb403",
         
     | 
| 
      
 134 
     | 
    
         
            +
              "serviceName": "api-v4",
         
     | 
| 
      
 135 
     | 
    
         
            +
              "message": "OK",
         
     | 
| 
      
 136 
     | 
    
         
            +
              "code": 200,
         
     | 
| 
      
 137 
     | 
    
         
            +
              "type": "SUCCESS"
         
     | 
| 
      
 138 
     | 
    
         
            +
            }
         
     | 
| 
      
 139 
     | 
    
         
            +
            ```
         
     | 
| 
      
 140 
     | 
    
         
            +
             
     | 
| 
      
 141 
     | 
    
         
            +
            ## Update a live event
         
     | 
| 
      
 142 
     | 
    
         
            +
            Update the specific Live event by edit values of parameters.
         
     | 
| 
      
 143 
     | 
    
         
            +
             
     | 
| 
      
 144 
     | 
    
         
            +
            See details [here](https://docs.uiza.io/v4/#update-a-live-event).
         
     | 
| 
      
 145 
     | 
    
         
            +
             
     | 
| 
      
 146 
     | 
    
         
            +
            ```ruby
         
     | 
| 
      
 147 
     | 
    
         
            +
            require "uiza"
         
     | 
| 
      
 148 
     | 
    
         
            +
             
     | 
| 
      
 149 
     | 
    
         
            +
            Uiza.app_id = "your-app-id"
         
     | 
| 
      
 150 
     | 
    
         
            +
            Uiza.authorization = "your-authorization"
         
     | 
| 
      
 151 
     | 
    
         
            +
             
     | 
| 
      
 152 
     | 
    
         
            +
            params = {
         
     | 
| 
      
 153 
     | 
    
         
            +
              id: "your-live-id",
         
     | 
| 
      
 154 
     | 
    
         
            +
              name: "live test",
         
     | 
| 
      
 155 
     | 
    
         
            +
              mode: "pull",
         
     | 
| 
      
 156 
     | 
    
         
            +
              encode: 0,
         
     | 
| 
      
 157 
     | 
    
         
            +
              dvr: 1,
         
     | 
| 
      
 158 
     | 
    
         
            +
              resourceMode: "single"
         
     | 
| 
      
 159 
     | 
    
         
            +
            }
         
     | 
| 
      
 160 
     | 
    
         
            +
             
     | 
| 
      
 161 
     | 
    
         
            +
            begin
         
     | 
| 
      
 162 
     | 
    
         
            +
              live = Uiza::Live.update params
         
     | 
| 
      
 163 
     | 
    
         
            +
              puts live.id
         
     | 
| 
      
 164 
     | 
    
         
            +
              puts live.name
         
     | 
| 
      
 165 
     | 
    
         
            +
            rescue Uiza::Error::UizaError => e
         
     | 
| 
      
 166 
     | 
    
         
            +
              puts "description_link: #{e.description_link}"
         
     | 
| 
      
 167 
     | 
    
         
            +
              puts "code: #{e.code}"
         
     | 
| 
      
 168 
     | 
    
         
            +
              puts "message: #{e.message}"
         
     | 
| 
      
 169 
     | 
    
         
            +
            rescue StandardError => e
         
     | 
| 
      
 170 
     | 
    
         
            +
              puts "message: #{e.message}"
         
     | 
| 
      
 171 
     | 
    
         
            +
            end
         
     | 
| 
      
 172 
     | 
    
         
            +
            ```
         
     | 
| 
      
 173 
     | 
    
         
            +
             
     | 
| 
      
 174 
     | 
    
         
            +
            Example Response
         
     | 
| 
      
 175 
     | 
    
         
            +
            ```json
         
     | 
| 
      
 176 
     | 
    
         
            +
            {
         
     | 
| 
      
 177 
     | 
    
         
            +
              "data": {
         
     | 
| 
      
 178 
     | 
    
         
            +
                "id": "40197661-4e43-4b6f-a555-4b87708650b1",
         
     | 
| 
      
 179 
     | 
    
         
            +
                "name": "Sample Live updated",
         
     | 
| 
      
 180 
     | 
    
         
            +
                "description": nil,
         
     | 
| 
      
 181 
     | 
    
         
            +
                "mode": "push",
         
     | 
| 
      
 182 
     | 
    
         
            +
                "resourceMode": "single",
         
     | 
| 
      
 183 
     | 
    
         
            +
                "encode": 0,
         
     | 
| 
      
 184 
     | 
    
         
            +
                "channelName": "44461a2e-ff43-4fe0-862e-fce72e7f6201",
         
     | 
| 
      
 185 
     | 
    
         
            +
                "lastPresetId": nil,
         
     | 
| 
      
 186 
     | 
    
         
            +
                "lastFeedId": "5eef64c2-a375-40a7-8de9-aff7b2becea3",
         
     | 
| 
      
 187 
     | 
    
         
            +
                "poster": nil,
         
     | 
| 
      
 188 
     | 
    
         
            +
                "thumbnail": nil,
         
     | 
| 
      
 189 
     | 
    
         
            +
                "linkPublishSocial": nil,
         
     | 
| 
      
 190 
     | 
    
         
            +
                "linkStream": nil,
         
     | 
| 
      
 191 
     | 
    
         
            +
                "lastPullInfo": nil,
         
     | 
| 
      
 192 
     | 
    
         
            +
                "lastPushInfo": [
         
     | 
| 
      
 193 
     | 
    
         
            +
                  {
         
     | 
| 
      
 194 
     | 
    
         
            +
                    "streamUrl": "rtmp://stag-asia-southeast1-u-01-gw.uizadev.io:1935/push-only",
         
     | 
| 
      
 195 
     | 
    
         
            +
                    "streamKey": "44461a2e-ff43-4fe0-862e-fce72e7f6201?token=857767c06f2d70cf525d1c302d69e034&ulasId=57ee741f-3daf-11e9-89c5-02c1b5b83c1a"
         
     | 
| 
      
 196 
     | 
    
         
            +
                  }
         
     | 
| 
      
 197 
     | 
    
         
            +
                ],
         
     | 
| 
      
 198 
     | 
    
         
            +
                "lastProcess": "stop",
         
     | 
| 
      
 199 
     | 
    
         
            +
                "eventType": nil,
         
     | 
| 
      
 200 
     | 
    
         
            +
                "drm": 0,
         
     | 
| 
      
 201 
     | 
    
         
            +
                "dvr": 0,
         
     | 
| 
      
 202 
     | 
    
         
            +
                "createdAt": "2019-03-12T07:08:30.000Z",
         
     | 
| 
      
 203 
     | 
    
         
            +
                "updatedAt": "2019-03-12T07:08:30.000Z"
         
     | 
| 
      
 204 
     | 
    
         
            +
              },
         
     | 
| 
      
 205 
     | 
    
         
            +
              "version": 4,
         
     | 
| 
      
 206 
     | 
    
         
            +
              "datetime": "2019-03-13T12:10:49.776Z",
         
     | 
| 
      
 207 
     | 
    
         
            +
              "policy": "public",
         
     | 
| 
      
 208 
     | 
    
         
            +
              "requestId": "9ab44ac2-2983-4268-ba6a-5aae25297481",
         
     | 
| 
      
 209 
     | 
    
         
            +
              "serviceName": "api-v4",
         
     | 
| 
      
 210 
     | 
    
         
            +
              "message": "OK",
         
     | 
| 
      
 211 
     | 
    
         
            +
              "code": 200,
         
     | 
| 
      
 212 
     | 
    
         
            +
              "type": "SUCCESS"
         
     | 
| 
      
 213 
     | 
    
         
            +
            }
         
     | 
| 
      
 214 
     | 
    
         
            +
            ```
         
     | 
| 
      
 215 
     | 
    
         
            +
             
     | 
| 
      
 216 
     | 
    
         
            +
            ## Start a live feed
         
     | 
| 
      
 217 
     | 
    
         
            +
            These API use to start a live event that has been create success.
         
     | 
| 
      
 218 
     | 
    
         
            +
            The Live channel minute start count whenever the event start success
         
     | 
| 
      
 219 
     | 
    
         
            +
             
     | 
| 
      
 220 
     | 
    
         
            +
            See details [here](https://docs.uiza.io/v4/#start-a-live-feed).
         
     | 
| 
      
 221 
     | 
    
         
            +
             
     | 
| 
      
 222 
     | 
    
         
            +
            ```ruby
         
     | 
| 
      
 223 
     | 
    
         
            +
            require "uiza"
         
     | 
| 
      
 224 
     | 
    
         
            +
             
     | 
| 
      
 225 
     | 
    
         
            +
            Uiza.app_id = "your-app-id"
         
     | 
| 
      
 226 
     | 
    
         
            +
            Uiza.authorization = "your-authorization"
         
     | 
| 
      
 227 
     | 
    
         
            +
             
     | 
| 
      
 228 
     | 
    
         
            +
            begin
         
     | 
| 
      
 229 
     | 
    
         
            +
              live = Uiza::Live.start_feed "your-live-id"
         
     | 
| 
      
 230 
     | 
    
         
            +
              puts live.id
         
     | 
| 
      
 231 
     | 
    
         
            +
            rescue Uiza::Error::UizaError => e
         
     | 
| 
      
 232 
     | 
    
         
            +
              puts "description_link: #{e.description_link}"
         
     | 
| 
      
 233 
     | 
    
         
            +
              puts "code: #{e.code}"
         
     | 
| 
      
 234 
     | 
    
         
            +
              puts "message: #{e.message}"
         
     | 
| 
      
 235 
     | 
    
         
            +
            rescue StandardError => e
         
     | 
| 
      
 236 
     | 
    
         
            +
              puts "message: #{e.message}"
         
     | 
| 
      
 237 
     | 
    
         
            +
            end
         
     | 
| 
      
 238 
     | 
    
         
            +
            ```
         
     | 
| 
      
 239 
     | 
    
         
            +
             
     | 
| 
      
 240 
     | 
    
         
            +
            Example Response
         
     | 
| 
      
 241 
     | 
    
         
            +
            ```json
         
     | 
| 
      
 242 
     | 
    
         
            +
            {
         
     | 
| 
      
 243 
     | 
    
         
            +
              "data": {
         
     | 
| 
      
 244 
     | 
    
         
            +
                "id": "40197661-4e43-4b6f-a555-4b87708650b1"
         
     | 
| 
      
 245 
     | 
    
         
            +
              },
         
     | 
| 
      
 246 
     | 
    
         
            +
              "version": 4,
         
     | 
| 
      
 247 
     | 
    
         
            +
              "datetime": "2019-03-13T12:13:38.556Z",
         
     | 
| 
      
 248 
     | 
    
         
            +
              "policy": "public",
         
     | 
| 
      
 249 
     | 
    
         
            +
              "requestId": "6aaa5abb-df16-4c64-a9fe-0b8e0398aa7f",
         
     | 
| 
      
 250 
     | 
    
         
            +
              "serviceName": "api-v4",
         
     | 
| 
      
 251 
     | 
    
         
            +
              "message": "OK",
         
     | 
| 
      
 252 
     | 
    
         
            +
              "code": 200,
         
     | 
| 
      
 253 
     | 
    
         
            +
              "type": "SUCCESS"
         
     | 
| 
      
 254 
     | 
    
         
            +
            }
         
     | 
| 
      
 255 
     | 
    
         
            +
            ```
         
     | 
| 
      
 256 
     | 
    
         
            +
             
     | 
| 
      
 257 
     | 
    
         
            +
            ## Get view of live feed
         
     | 
| 
      
 258 
     | 
    
         
            +
            This API use to get a live view status . This view only show when event has been started and being processing.
         
     | 
| 
      
 259 
     | 
    
         
            +
             
     | 
| 
      
 260 
     | 
    
         
            +
            See details [here](https://docs.uiza.io/v4/#retrieve-views).
         
     | 
| 
      
 261 
     | 
    
         
            +
             
     | 
| 
      
 262 
     | 
    
         
            +
            ```ruby
         
     | 
| 
      
 263 
     | 
    
         
            +
            require "uiza"
         
     | 
| 
      
 264 
     | 
    
         
            +
             
     | 
| 
      
 265 
     | 
    
         
            +
            Uiza.app_id = "your-app-id"
         
     | 
| 
      
 266 
     | 
    
         
            +
            Uiza.authorization = "your-authorization"
         
     | 
| 
      
 267 
     | 
    
         
            +
             
     | 
| 
      
 268 
     | 
    
         
            +
            begin
         
     | 
| 
      
 269 
     | 
    
         
            +
              response = Uiza::Live.get_view "your-live-id"
         
     | 
| 
      
 270 
     | 
    
         
            +
              puts response.watchnow
         
     | 
| 
      
 271 
     | 
    
         
            +
            rescue Uiza::Error::UizaError => e
         
     | 
| 
      
 272 
     | 
    
         
            +
              puts "description_link: #{e.description_link}"
         
     | 
| 
      
 273 
     | 
    
         
            +
              puts "code: #{e.code}"
         
     | 
| 
      
 274 
     | 
    
         
            +
              puts "message: #{e.message}"
         
     | 
| 
      
 275 
     | 
    
         
            +
            rescue StandardError => e
         
     | 
| 
      
 276 
     | 
    
         
            +
              puts "message: #{e.message}"
         
     | 
| 
      
 277 
     | 
    
         
            +
            end
         
     | 
| 
      
 278 
     | 
    
         
            +
            ```
         
     | 
| 
      
 279 
     | 
    
         
            +
             
     | 
| 
      
 280 
     | 
    
         
            +
            Example Response
         
     | 
| 
      
 281 
     | 
    
         
            +
            ```json
         
     | 
| 
      
 282 
     | 
    
         
            +
            {
         
     | 
| 
      
 283 
     | 
    
         
            +
              "data": {
         
     | 
| 
      
 284 
     | 
    
         
            +
                "watchnow": 0
         
     | 
| 
      
 285 
     | 
    
         
            +
              },
         
     | 
| 
      
 286 
     | 
    
         
            +
              "version": 4,
         
     | 
| 
      
 287 
     | 
    
         
            +
              "datetime": "2019-03-13T12:17:17.416Z",
         
     | 
| 
      
 288 
     | 
    
         
            +
              "policy": "public",
         
     | 
| 
      
 289 
     | 
    
         
            +
              "requestId": "ed933ac0-e5ed-46c8-91eb-88e0c39577fc",
         
     | 
| 
      
 290 
     | 
    
         
            +
              "serviceName": "api-v4",
         
     | 
| 
      
 291 
     | 
    
         
            +
              "message": "OK",
         
     | 
| 
      
 292 
     | 
    
         
            +
              "code": 200,
         
     | 
| 
      
 293 
     | 
    
         
            +
              "type": "SUCCESS"
         
     | 
| 
      
 294 
     | 
    
         
            +
            }
         
     | 
| 
      
 295 
     | 
    
         
            +
            ```
         
     | 
| 
      
 296 
     | 
    
         
            +
             
     | 
| 
      
 297 
     | 
    
         
            +
            ## Stop a live feed
         
     | 
| 
      
 298 
     | 
    
         
            +
            Stop live event
         
     | 
| 
      
 299 
     | 
    
         
            +
             
     | 
| 
      
 300 
     | 
    
         
            +
            See details [here](https://docs.uiza.io/v4/#stop-a-live-feed).
         
     | 
| 
      
 301 
     | 
    
         
            +
             
     | 
| 
      
 302 
     | 
    
         
            +
            ```ruby
         
     | 
| 
      
 303 
     | 
    
         
            +
            require "uiza"
         
     | 
| 
      
 304 
     | 
    
         
            +
            Uiza.app_id = "your-app-id"
         
     | 
| 
      
 305 
     | 
    
         
            +
            Uiza.authorization = "your-authorization"
         
     | 
| 
      
 306 
     | 
    
         
            +
             
     | 
| 
      
 307 
     | 
    
         
            +
            begin
         
     | 
| 
      
 308 
     | 
    
         
            +
              live = Uiza::Live.stop_feed "your-live-id"
         
     | 
| 
      
 309 
     | 
    
         
            +
              puts live.id
         
     | 
| 
      
 310 
     | 
    
         
            +
            rescue Uiza::Error::UizaError => e
         
     | 
| 
      
 311 
     | 
    
         
            +
              puts "description_link: #{e.description_link}"
         
     | 
| 
      
 312 
     | 
    
         
            +
              puts "code: #{e.code}"
         
     | 
| 
      
 313 
     | 
    
         
            +
              puts "message: #{e.message}"
         
     | 
| 
      
 314 
     | 
    
         
            +
            rescue StandardError => e
         
     | 
| 
      
 315 
     | 
    
         
            +
              puts "message: #{e.message}"
         
     | 
| 
      
 316 
     | 
    
         
            +
            end
         
     | 
| 
      
 317 
     | 
    
         
            +
            ```
         
     | 
| 
      
 318 
     | 
    
         
            +
             
     | 
| 
      
 319 
     | 
    
         
            +
            Example Response
         
     | 
| 
      
 320 
     | 
    
         
            +
            ```json
         
     | 
| 
      
 321 
     | 
    
         
            +
            {
         
     | 
| 
      
 322 
     | 
    
         
            +
              "data": {
         
     | 
| 
      
 323 
     | 
    
         
            +
                "id": "40197661-4e43-4b6f-a555-4b87708650b1"
         
     | 
| 
      
 324 
     | 
    
         
            +
              },
         
     | 
| 
      
 325 
     | 
    
         
            +
              "version": 4,
         
     | 
| 
      
 326 
     | 
    
         
            +
              "datetime": "2019-03-13T12:13:38.556Z",
         
     | 
| 
      
 327 
     | 
    
         
            +
              "policy": "public",
         
     | 
| 
      
 328 
     | 
    
         
            +
              "requestId": "6aaa5abb-df16-4c64-a9fe-0b8e0398aa7f",
         
     | 
| 
      
 329 
     | 
    
         
            +
              "serviceName": "api-v4",
         
     | 
| 
      
 330 
     | 
    
         
            +
              "message": "OK",
         
     | 
| 
      
 331 
     | 
    
         
            +
              "code": 200,
         
     | 
| 
      
 332 
     | 
    
         
            +
              "type": "SUCCESS"
         
     | 
| 
      
 333 
     | 
    
         
            +
            }
         
     | 
| 
      
 334 
     | 
    
         
            +
            ```
         
     | 
| 
      
 335 
     | 
    
         
            +
             
     | 
| 
      
 336 
     | 
    
         
            +
            ## List all recorded files
         
     | 
| 
      
 337 
     | 
    
         
            +
            Retrieves list of recorded file after streamed (only available when your live event has turned on Record feature)
         
     | 
| 
      
 338 
     | 
    
         
            +
             
     | 
| 
      
 339 
     | 
    
         
            +
            See details [here](https://docs.uiza.io/v4/#list-recorded-files).
         
     | 
| 
      
 340 
     | 
    
         
            +
             
     | 
| 
      
 341 
     | 
    
         
            +
            ```ruby
         
     | 
| 
      
 342 
     | 
    
         
            +
            require "uiza"
         
     | 
| 
      
 343 
     | 
    
         
            +
             
     | 
| 
      
 344 
     | 
    
         
            +
            Uiza.app_id = "your-app-id"
         
     | 
| 
      
 345 
     | 
    
         
            +
            Uiza.authorization = "your-authorization"
         
     | 
| 
      
 346 
     | 
    
         
            +
             
     | 
| 
      
 347 
     | 
    
         
            +
            params = {
         
     | 
| 
      
 348 
     | 
    
         
            +
              limit: 2
         
     | 
| 
      
 349 
     | 
    
         
            +
            }
         
     | 
| 
      
 350 
     | 
    
         
            +
             
     | 
| 
      
 351 
     | 
    
         
            +
            begin
         
     | 
| 
      
 352 
     | 
    
         
            +
              lives = Uiza::Live.list_recorded params
         
     | 
| 
      
 353 
     | 
    
         
            +
              # params is optional
         
     | 
| 
      
 354 
     | 
    
         
            +
              # or lives = Uiza::Live.list_recorded
         
     | 
| 
      
 355 
     | 
    
         
            +
              puts live.first.id
         
     | 
| 
      
 356 
     | 
    
         
            +
              puts live.first.entityId
         
     | 
| 
      
 357 
     | 
    
         
            +
            rescue Uiza::Error::UizaError => e
         
     | 
| 
      
 358 
     | 
    
         
            +
              puts "description_link: #{e.description_link}"
         
     | 
| 
      
 359 
     | 
    
         
            +
              puts "code: #{e.code}"
         
     | 
| 
      
 360 
     | 
    
         
            +
              puts "message: #{e.message}"
         
     | 
| 
      
 361 
     | 
    
         
            +
            rescue StandardError => e
         
     | 
| 
      
 362 
     | 
    
         
            +
              puts "message: #{e.message}"
         
     | 
| 
      
 363 
     | 
    
         
            +
            end
         
     | 
| 
      
 364 
     | 
    
         
            +
            ```
         
     | 
| 
      
 365 
     | 
    
         
            +
             
     | 
| 
      
 366 
     | 
    
         
            +
            Example Response
         
     | 
| 
      
 367 
     | 
    
         
            +
            ```json
         
     | 
| 
      
 368 
     | 
    
         
            +
            {
         
     | 
| 
      
 369 
     | 
    
         
            +
              "data": [
         
     | 
| 
      
 370 
     | 
    
         
            +
                {
         
     | 
| 
      
 371 
     | 
    
         
            +
                  "id": "40197661-4e43-4b6f-a555-4b87708650b1",
         
     | 
| 
      
 372 
     | 
    
         
            +
                  "name": "Sample Live updated",
         
     | 
| 
      
 373 
     | 
    
         
            +
                  "description": nil,
         
     | 
| 
      
 374 
     | 
    
         
            +
                  "mode": "push",
         
     | 
| 
      
 375 
     | 
    
         
            +
                  "resourceMode": "single",
         
     | 
| 
      
 376 
     | 
    
         
            +
                  "encode": 0,
         
     | 
| 
      
 377 
     | 
    
         
            +
                  "channelName": "44461a2e-ff43-4fe0-862e-fce72e7f6201",
         
     | 
| 
      
 378 
     | 
    
         
            +
                  "lastPresetId": nil,
         
     | 
| 
      
 379 
     | 
    
         
            +
                  "lastFeedId": "2d90d8f9-bf97-455a-b3d6-1a5dec487381",
         
     | 
| 
      
 380 
     | 
    
         
            +
                  "poster": nil,
         
     | 
| 
      
 381 
     | 
    
         
            +
                  "thumbnail": nil,
         
     | 
| 
      
 382 
     | 
    
         
            +
                  "linkPublishSocial": nil,
         
     | 
| 
      
 383 
     | 
    
         
            +
                  "linkStream": nil,
         
     | 
| 
      
 384 
     | 
    
         
            +
                  "lastPullInfo": nil,
         
     | 
| 
      
 385 
     | 
    
         
            +
                  "lastPushInfo": [
         
     | 
| 
      
 386 
     | 
    
         
            +
                    {
         
     | 
| 
      
 387 
     | 
    
         
            +
                      "streamUrl": "rtmp://stag-asia-southeast1-u-01-gw.uizadev.io:1935/push-only",
         
     | 
| 
      
 388 
     | 
    
         
            +
                      "streamKey": "44461a2e-ff43-4fe0-862e-fce72e7f6201?token=857767c06f2d70cf525d1c302d69e034&ulasId=57ee741f-3daf-11e9-89c5-02c1b5b83c1a"
         
     | 
| 
      
 389 
     | 
    
         
            +
                    }
         
     | 
| 
      
 390 
     | 
    
         
            +
                  ],
         
     | 
| 
      
 391 
     | 
    
         
            +
                  "lastProcess": "init",
         
     | 
| 
      
 392 
     | 
    
         
            +
                  "eventType": nil,
         
     | 
| 
      
 393 
     | 
    
         
            +
                  "drm": 0,
         
     | 
| 
      
 394 
     | 
    
         
            +
                  "dvr": 0,
         
     | 
| 
      
 395 
     | 
    
         
            +
                  "createdAt": "2019-03-12T07:08:30.000Z",
         
     | 
| 
      
 396 
     | 
    
         
            +
                  "updatedAt": "2019-03-12T07:08:30.000Z"
         
     | 
| 
      
 397 
     | 
    
         
            +
                }
         
     | 
| 
      
 398 
     | 
    
         
            +
              ],
         
     | 
| 
      
 399 
     | 
    
         
            +
              "version": 4,
         
     | 
| 
      
 400 
     | 
    
         
            +
              "datetime": "2019-03-13T12:19:42.074Z",
         
     | 
| 
      
 401 
     | 
    
         
            +
              "policy": "public",
         
     | 
| 
      
 402 
     | 
    
         
            +
              "requestId": "e7621f67-27ba-43a8-8ae1-6da48b0a6b03",
         
     | 
| 
      
 403 
     | 
    
         
            +
              "serviceName": "api-v4",
         
     | 
| 
      
 404 
     | 
    
         
            +
              "message": "OK",
         
     | 
| 
      
 405 
     | 
    
         
            +
              "code": 200,
         
     | 
| 
      
 406 
     | 
    
         
            +
              "type": "SUCCESS"
         
     | 
| 
      
 407 
     | 
    
         
            +
            }
         
     | 
| 
      
 408 
     | 
    
         
            +
            ```
         
     | 
| 
      
 409 
     | 
    
         
            +
             
     | 
| 
      
 410 
     | 
    
         
            +
            ## Delete a record file
         
     | 
| 
      
 411 
     | 
    
         
            +
            Delete a recorded file
         
     | 
| 
      
 412 
     | 
    
         
            +
             
     | 
| 
      
 413 
     | 
    
         
            +
            See details [here](https://docs.uiza.io/v4/#delete-a-record-file).
         
     | 
| 
      
 414 
     | 
    
         
            +
             
     | 
| 
      
 415 
     | 
    
         
            +
            ```ruby
         
     | 
| 
      
 416 
     | 
    
         
            +
            require "uiza"
         
     | 
| 
      
 417 
     | 
    
         
            +
             
     | 
| 
      
 418 
     | 
    
         
            +
            Uiza.app_id = "your-app-id"
         
     | 
| 
      
 419 
     | 
    
         
            +
            Uiza.authorization = "your-authorization"
         
     | 
| 
      
 420 
     | 
    
         
            +
             
     | 
| 
      
 421 
     | 
    
         
            +
            begin
         
     | 
| 
      
 422 
     | 
    
         
            +
              live = Uiza::Live.delete "your-record-id" #Identifier of record (get from list record)
         
     | 
| 
      
 423 
     | 
    
         
            +
              puts live.id
         
     | 
| 
      
 424 
     | 
    
         
            +
            rescue Uiza::Error::UizaError => e
         
     | 
| 
      
 425 
     | 
    
         
            +
              puts "description_link: #{e.description_link}"
         
     | 
| 
      
 426 
     | 
    
         
            +
              puts "code: #{e.code}"
         
     | 
| 
      
 427 
     | 
    
         
            +
              puts "message: #{e.message}"
         
     | 
| 
      
 428 
     | 
    
         
            +
            rescue StandardError => e
         
     | 
| 
      
 429 
     | 
    
         
            +
              puts "message: #{e.message}"
         
     | 
| 
      
 430 
     | 
    
         
            +
            end
         
     | 
| 
      
 431 
     | 
    
         
            +
            ```
         
     | 
| 
      
 432 
     | 
    
         
            +
             
     | 
| 
      
 433 
     | 
    
         
            +
            Example Response
         
     | 
| 
      
 434 
     | 
    
         
            +
            ```json
         
     | 
| 
      
 435 
     | 
    
         
            +
            {
         
     | 
| 
      
 436 
     | 
    
         
            +
              "data": {
         
     | 
| 
      
 437 
     | 
    
         
            +
                "id": "40197661-4e43-4b6f-a555-4b87708650b1"
         
     | 
| 
      
 438 
     | 
    
         
            +
              },
         
     | 
| 
      
 439 
     | 
    
         
            +
              "version": 4,
         
     | 
| 
      
 440 
     | 
    
         
            +
              "datetime": "2019-03-13T12:22:54.735Z",
         
     | 
| 
      
 441 
     | 
    
         
            +
              "policy": "public",
         
     | 
| 
      
 442 
     | 
    
         
            +
              "requestId": "20649dd3-41f5-4762-8c37-96aaac4f6498",
         
     | 
| 
      
 443 
     | 
    
         
            +
              "serviceName": "api-v4",
         
     | 
| 
      
 444 
     | 
    
         
            +
              "message": "OK",
         
     | 
| 
      
 445 
     | 
    
         
            +
              "code": 200,
         
     | 
| 
      
 446 
     | 
    
         
            +
              "type": "SUCCESS"
         
     | 
| 
      
 447 
     | 
    
         
            +
            }
         
     | 
| 
      
 448 
     | 
    
         
            +
            ```
         
     | 
| 
      
 449 
     | 
    
         
            +
             
     | 
| 
      
 450 
     | 
    
         
            +
            ## Convert into VOD
         
     | 
| 
      
 451 
     | 
    
         
            +
            Convert recorded file into VOD entity. After converted, your file can be stream via Uiza's CDN.
         
     | 
| 
      
 452 
     | 
    
         
            +
             
     | 
| 
      
 453 
     | 
    
         
            +
            See details [here](https://docs.uiza.io/v4/#convert-into-vod).
         
     | 
| 
      
 454 
     | 
    
         
            +
             
     | 
| 
      
 455 
     | 
    
         
            +
            ```ruby
         
     | 
| 
      
 456 
     | 
    
         
            +
            require "uiza"
         
     | 
| 
      
 457 
     | 
    
         
            +
             
     | 
| 
      
 458 
     | 
    
         
            +
            Uiza.app_id = "your-app-id"
         
     | 
| 
      
 459 
     | 
    
         
            +
            Uiza.authorization = "your-authorization"
         
     | 
| 
      
 460 
     | 
    
         
            +
             
     | 
| 
      
 461 
     | 
    
         
            +
            begin
         
     | 
| 
      
 462 
     | 
    
         
            +
              live = Uiza::Live.convert_to_vod "your-record-id" #Identifier of record (get from list record)
         
     | 
| 
      
 463 
     | 
    
         
            +
              puts live.id
         
     | 
| 
      
 464 
     | 
    
         
            +
            rescue Uiza::Error::UizaError => e
         
     | 
| 
      
 465 
     | 
    
         
            +
              puts "description_link: #{e.description_link}"
         
     | 
| 
      
 466 
     | 
    
         
            +
              puts "code: #{e.code}"
         
     | 
| 
      
 467 
     | 
    
         
            +
              puts "message: #{e.message}"
         
     | 
| 
      
 468 
     | 
    
         
            +
            rescue StandardError => e
         
     | 
| 
      
 469 
     | 
    
         
            +
              puts "message: #{e.message}"
         
     | 
| 
      
 470 
     | 
    
         
            +
            end
         
     | 
| 
      
 471 
     | 
    
         
            +
            ```
         
     | 
| 
      
 472 
     | 
    
         
            +
             
     | 
| 
      
 473 
     | 
    
         
            +
            Example Response
         
     | 
| 
      
 474 
     | 
    
         
            +
            ```json
         
     | 
| 
      
 475 
     | 
    
         
            +
            {
         
     | 
| 
      
 476 
     | 
    
         
            +
              "data": {
         
     | 
| 
      
 477 
     | 
    
         
            +
                "id": "40197661-4e43-4b6f-a555-4b87708650b1",
         
     | 
| 
      
 478 
     | 
    
         
            +
                "name": "Sample Live updated",
         
     | 
| 
      
 479 
     | 
    
         
            +
                "description": nil,
         
     | 
| 
      
 480 
     | 
    
         
            +
                "mode": "push",
         
     | 
| 
      
 481 
     | 
    
         
            +
                "resourceMode": "single",
         
     | 
| 
      
 482 
     | 
    
         
            +
                "encode": 0,
         
     | 
| 
      
 483 
     | 
    
         
            +
                "channelName": "44461a2e-ff43-4fe0-862e-fce72e7f6201",
         
     | 
| 
      
 484 
     | 
    
         
            +
                "lastPresetId": nil,
         
     | 
| 
      
 485 
     | 
    
         
            +
                "lastFeedId": "2d90d8f9-bf97-455a-b3d6-1a5dec487381",
         
     | 
| 
      
 486 
     | 
    
         
            +
                "poster": nil,
         
     | 
| 
      
 487 
     | 
    
         
            +
                "thumbnail": nil,
         
     | 
| 
      
 488 
     | 
    
         
            +
                "linkPublishSocial": nil,
         
     | 
| 
      
 489 
     | 
    
         
            +
                "linkStream": nil,
         
     | 
| 
      
 490 
     | 
    
         
            +
                "lastPullInfo": nil,
         
     | 
| 
      
 491 
     | 
    
         
            +
                "lastPushInfo": [
         
     | 
| 
      
 492 
     | 
    
         
            +
                  {
         
     | 
| 
      
 493 
     | 
    
         
            +
                    "streamUrl": "rtmp://stag-asia-southeast1-u-01-gw.uizadev.io:1935/push-only",
         
     | 
| 
      
 494 
     | 
    
         
            +
                    "streamKey": "44461a2e-ff43-4fe0-862e-fce72e7f6201?token=857767c06f2d70cf525d1c302d69e034&ulasId=57ee741f-3daf-11e9-89c5-02c1b5b83c1a"
         
     | 
| 
      
 495 
     | 
    
         
            +
                  }
         
     | 
| 
      
 496 
     | 
    
         
            +
                ],
         
     | 
| 
      
 497 
     | 
    
         
            +
                "lastProcess": "init",
         
     | 
| 
      
 498 
     | 
    
         
            +
                "eventType": nil,
         
     | 
| 
      
 499 
     | 
    
         
            +
                "drm": 0,
         
     | 
| 
      
 500 
     | 
    
         
            +
                "dvr": 0,
         
     | 
| 
      
 501 
     | 
    
         
            +
                "createdAt": "2019-03-12T07:08:30.000Z",
         
     | 
| 
      
 502 
     | 
    
         
            +
                "updatedAt": "2019-03-12T07:08:30.000Z"
         
     | 
| 
      
 503 
     | 
    
         
            +
              },
         
     | 
| 
      
 504 
     | 
    
         
            +
              "version": 4,
         
     | 
| 
      
 505 
     | 
    
         
            +
              "datetime": "2019-03-13T12:13:38.556Z",
         
     | 
| 
      
 506 
     | 
    
         
            +
              "policy": "public",
         
     | 
| 
      
 507 
     | 
    
         
            +
              "requestId": "6aaa5abb-df16-4c64-a9fe-0b8e0398aa7f",
         
     | 
| 
      
 508 
     | 
    
         
            +
              "serviceName": "api-v4",
         
     | 
| 
      
 509 
     | 
    
         
            +
              "message": "OK",
         
     | 
| 
      
 510 
     | 
    
         
            +
              "code": 200,
         
     | 
| 
      
 511 
     | 
    
         
            +
              "type": "SUCCESS"
         
     | 
| 
      
 512 
     | 
    
         
            +
            }
         
     | 
| 
      
 513 
     | 
    
         
            +
            ```
         
     |