File tree Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ PHP library for interacting with the Qencode API.
1313``` json 
1414    {
1515      "require" : {
16-         "qencode/api-client" : " 1.03 .*" 
16+         "qencode/api-client" : " 1.05 .*" 
1717      }
1818    }
1919```  
Original file line number Diff line number Diff line change 1+ <?php 
2+ require_once  __DIR__  . '/../autoload.php ' ;
3+ 
4+ use  Qencode \Exceptions \QencodeApiException ;
5+ use  Qencode \Exceptions \QencodeException ;
6+ use  Qencode \QencodeApiClient ;
7+ use  Qencode \Classes \TranscodingTask ;
8+ 
9+ //This example gets task status from main api endpoint (api.qencode.com) 
10+ 
11+ $ api_endpoint'https://api.qencode.com ' ;
12+ //replace with your api key 
13+ $ apiKey'acbde123456 ' ;
14+ //replace with your task token value 
15+ $ task_token'fd17cc37c84f1233c0f62d6abcde123 ' ;
16+ $ status_url$ api_endpoint'/v1/status ' ;
17+ $ qnew  QencodeApiClient ($ apiKey$ api_endpoint
18+ 
19+ $ paramsarray ('task_tokens[] '  => $ task_token
20+ $ response$ qpost ($ status_url$ params
21+ $ status$ response'statuses ' ][$ task_token
22+ if  ($ statusnull ) {
23+     throw  new  QencodeClientException ('Task  ' . $ task_token' not found! ' );
24+ }
25+ if  (array_key_exists ('status_url ' , $ status
26+     $ status_url$ status'status_url ' ];
27+ }
28+ print_r ($ status
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments