GoCoinAPI.Client.create_get_url C# (CSharp) Method

create_get_url() public method

public create_get_url ( string url, object _params ) : string
url string
_params object
return string
    public string create_get_url(string url, object _params){
        string result =null;
        string _url = url;
        var a  = _params;
      //  if(string.IsNullOrEmpty(_params.ToString())){
             var type = a.GetType();
             var props = type.GetProperties();
             var pairs = props.Select(x => x.Name + "=" + x.GetValue(a, null)).ToArray();
            result = string.Join("&", pairs);

            _url = url.Trim() + "?" + result;
       // }        
        return _url;
    }

Usage Example

Ejemplo n.º 1
0
    /**
    * Return Authorization url to get auth_code 
    *
    * @return string 
    */

    public string  get_auth_url() {  
        _client  = new Client();
        string url = _client.get_dashboard_url() + "/auth";
        var param = new { response_type = "code", client_id =_client.client_id , redirect_uri = _client.get_current_url(),scope=_client.scope };
        url = _client.create_get_url(url, param);
        return url;
    }
All Usage Examples Of GoCoinAPI.Client::create_get_url