samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Api/PetApi.cs
/// <summary>
/// Finds Pets by tags Muliple tags can be provided with comma separated strings. Use\\ \\ tag1, tag2, tag3 for testing.
/// </summary>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="tags">Tags to filter by</param>
/// <returns>ApiResponse of List&lt;Pet&gt;</returns>
Finds Pets by tags Muliple tags can be provided with comma separated strings. Use\\ \\ tag1, tag2, tag3 for testing.
Finds Pets by tags Muliple tags can be provided with comma separated strings . Use \\ \\ tag1 tag2 tag3 for testing .
public ApiResponse< List<Pet> > FindPetsByTagsWithHttpInfo (List<string> tags)
        {
            if (tags == null)
                throw new ApiException(400, "Missing required parameter 'tags' when calling PetApi->FindPetsByTags");
            var localVarPath = "/pet/findByTags";
            var localVarPathParams = new Dictionary<String, String>();
            var localVarQueryParams = new List<KeyValuePair<String, String>>();
            var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
            var localVarFormParams = new Dictionary<String, String>();
            var localVarFileParams = new Dictionary<String, FileParameter>();
            Object localVarPostBody = null;
            String[] localVarHttpContentTypes = new String[] {
            };
            String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
            String[] localVarHttpHeaderAccepts = new String[] {
                "application/json",
                "application/xml"
            };
            String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
            if (localVarHttpHeaderAccept != null)
                localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
            if (tags != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "tags", tags)); 
            if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
            {
                localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
            }
            IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
                Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
                localVarPathParams, localVarHttpContentType);
            int localVarStatusCode = (int) localVarResponse.StatusCode;
            if (ExceptionFactory != null)
            {
                Exception exception = ExceptionFactory("FindPetsByTags", localVarResponse);
                if (exception != null) throw exception;
            }
            return new ApiResponse<List<Pet>>(localVarStatusCode,
                localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
                (List<Pet>) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List<Pet>)));
        }
public ApiResponse < List < Pet > > FindPetsByTagsWithHttpInfo ( List < string > tags ) { if ( tags == null ) throw new ApiException ( 400 , " " ) ; var localVarPath = " " ; var localVarPathParams = new Dictionary < String , String > ( ) ; var localVarQueryParams = new List < KeyValuePair < String , String > > ( ) ; var localVarHeaderParams = new Dictionary < String , String > ( this . Configuration . DefaultHeader ) ; var localVarFormParams = new Dictionary < String , String > ( ) ; var localVarFileParams = new Dictionary < String , FileParameter > ( ) ; Object localVarPostBody = null ; String [ ] localVarHttpContentTypes = new String [ ] { } ; String localVarHttpContentType = this . Configuration . ApiClient . SelectHeaderContentType ( localVarHttpContentTypes ) ; String [ ] localVarHttpHeaderAccepts = new String [ ] { " " , " " } ; String localVarHttpHeaderAccept = this . Configuration . ApiClient . SelectHeaderAccept ( localVarHttpHeaderAccepts ) ; if ( localVarHttpHeaderAccept != null ) localVarHeaderParams . Add ( " " , localVarHttpHeaderAccept ) ; if ( tags != null ) localVarQueryParams . AddRange ( this . Configuration . ApiClient . ParameterToKeyValuePairs ( " " , " " , tags ) ) ; if ( ! String . IsNullOrEmpty ( this . Configuration . AccessToken ) ) { localVarHeaderParams [ " " ] = " " + this . Configuration . AccessToken ; } IRestResponse localVarResponse = ( IRestResponse ) this . Configuration . ApiClient . CallApi ( localVarPath , Method . GET , localVarQueryParams , localVarPostBody , localVarHeaderParams , localVarFormParams , localVarFileParams , localVarPathParams , localVarHttpContentType ) ; int localVarStatusCode = ( int ) localVarResponse . StatusCode ; if ( ExceptionFactory != null ) { Exception exception = ExceptionFactory ( " " , localVarResponse ) ; if ( exception != null ) throw exception ; } return new ApiResponse < List < Pet > > ( localVarStatusCode , localVarResponse . Headers . ToDictionary ( x => x . Name , x => string . Join ( " " , x . Value ) ) , ( List < Pet > ) this . Configuration . ApiClient . Deserialize ( localVarResponse , typeof ( List < Pet > ) ) ) ; }
Finds Pets by tags Muliple tags can be provided with comma separated strings.
Finds Pets by tags Muliple tags can be provided with comma separated strings .
// verify the required parameter 'tags' is set // to determine the Content-Type header // to determine the Accept header // query parameter // authentication (petstore_auth) required // oauth required // make the HTTP request
ApiResponse of List
ApiResponse of List
Thrown when fails to make API call
Thrown when fails to make API call
tags
List<string>
Tags to filter by
Tags to filter by