# MuxRuby::VideoViewsApi All URIs are relative to *https://api.mux.com* Method | HTTP request | Description ------------- | ------------- | ------------- [**get_video_view**](VideoViewsApi.md#get_video_view) | **GET** /data/v1/video-views/{VIDEO_VIEW_ID} | Get a Video View [**list_video_views**](VideoViewsApi.md#list_video_views) | **GET** /data/v1/video-views | List Video Views # **get_video_view** > VideoViewResponse get_video_view(video_view_id) Get a Video View Returns the details of a video view ### Example ```ruby # load the gem require 'mux_ruby' # setup authorization MuxRuby.configure do |config| # Configure HTTP basic authorization: accessToken config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = MuxRuby::VideoViewsApi.new video_view_id = 'abcd1234' # String | ID of the Video View begin #Get a Video View result = api_instance.get_video_view(video_view_id) p result rescue MuxRuby::ApiError => e puts "Exception when calling VideoViewsApi->get_video_view: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **video_view_id** | **String**| ID of the Video View | ### Return type [**VideoViewResponse**](VideoViewResponse.md) ### Authorization [accessToken](../README.md#accessToken) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **list_video_views** > ListVideoViewsResponse list_video_views(opts) List Video Views Returns a list of video views ### Example ```ruby # load the gem require 'mux_ruby' # setup authorization MuxRuby.configure do |config| # Configure HTTP basic authorization: accessToken config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = MuxRuby::VideoViewsApi.new opts = { limit: 25, # Integer | Number of items to include in the response page: 1, # Integer | Offset by this many pages, of the size of `limit` viewer_id: 'viewer_id_example', # String | Viewer ID to filter results by. This value may be provided by the integration, or may be created by Mux. error_id: 56, # Integer | Filter video views by the provided error ID (as returned in the error_type_id field in the list video views endpoint). If you provide any as the error ID, this will filter the results to those with any error. order_direction: 'order_direction_example', # String | Sort order. filters: ['filters_example'], # Array | Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. timeframe: ['timeframe_example'] # Array | Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. timeframe[]=1498867200&timeframe[]=1498953600 * duration string e.g. timeframe[]=24:hours or timeframe[]=7:days. } begin #List Video Views result = api_instance.list_video_views(opts) p result rescue MuxRuby::ApiError => e puts "Exception when calling VideoViewsApi->list_video_views: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **limit** | **Integer**| Number of items to include in the response | [optional] [default to 25] **page** | **Integer**| Offset by this many pages, of the size of `limit` | [optional] [default to 1] **viewer_id** | **String**| Viewer ID to filter results by. This value may be provided by the integration, or may be created by Mux. | [optional] **error_id** | **Integer**| Filter video views by the provided error ID (as returned in the error_type_id field in the list video views endpoint). If you provide any as the error ID, this will filter the results to those with any error. | [optional] **order_direction** | **String**| Sort order. | [optional] **filters** | [**Array<String>**](String.md)| Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. | [optional] **timeframe** | [**Array<String>**](String.md)| Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. timeframe[]=1498867200&timeframe[]=1498953600 * duration string e.g. timeframe[]=24:hours or timeframe[]=7:days. | [optional] ### Return type [**ListVideoViewsResponse**](ListVideoViewsResponse.md) ### Authorization [accessToken](../README.md#accessToken) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json