#Script Pages

<back to all web services

QueryGitHubRepos

import java.math.*
import java.util.*
import net.servicestack.client.*
import com.google.gson.annotations.*
import com.google.gson.reflect.*


open class QueryGitHubRepos : QueryData<GithubRepo>()
{
    var userName:String? = null
}

open class QueryData<T> : QueryBase()
{
}

@DataContract
open class QueryBase
{
    @DataMember(Order=1)
    var skip:Int? = null

    @DataMember(Order=2)
    var take:Int? = null

    @DataMember(Order=3)
    var orderBy:String? = null

    @DataMember(Order=4)
    var orderByDesc:String? = null

    @DataMember(Order=5)
    var include:String? = null

    @DataMember(Order=6)
    var fields:String? = null

    @DataMember(Order=7)
    var meta:HashMap<String,String> = HashMap<String,String>()
}

open class GithubRepo
{
    var id:Int? = null
    var name:String? = null
    var description:String? = null
    var homepage:String? = null
    var language:String? = null
    var watchers_Count:Int? = null
    var stargazes_Count:Int? = null
    var forks_Count:Int? = null
    var open_Issues_Count:Int? = null
    var size:Int? = null
    var full_Name:String? = null
    var created_at:Date? = null
    var pushed_At:Date? = null
    var updated_At:Date? = null
    var has_issues:Boolean? = null
    var has_Downloads:Boolean? = null
    var has_Wiki:Boolean? = null
    var has_Pages:Boolean? = null
    var fork:Boolean? = null
    var owner:GithubUser? = null
    var svn_Url:String? = null
    var mirror_Url:String? = null
    var url:String? = null
    var ssh_Url:String? = null
    var html_Url:String? = null
    var clone_Url:String? = null
    var git_Url:String? = null
    @SerializedName("private") var Private:Boolean? = null
}

open class GithubUser
{
    var id:Int? = null
    var login:String? = null
    var avatar_Url:String? = null
    var url:String? = null
    var followers:Int? = null
    var following:Int? = null
    @SerializedName("type") var Type:String? = null
    var public_Gists:Int? = null
    var location:String? = null
    var company:String? = null
    var html_Url:String? = null
    var public_Repos:Int? = null
    var created_At:Date? = null
    var blog:String? = null
    var email:String? = null
    var name:String? = null
    var hireable:Boolean? = null
    var gravatar_Id:String? = null
    var bio:String? = null
}

@DataContract
open class QueryResponse<Customer>
{
    @DataMember(Order=1)
    var offset:Int? = null

    @DataMember(Order=2)
    var total:Int? = null

    @DataMember(Order=3)
    var results:ArrayList<Customer> = ArrayList<Customer>()

    @DataMember(Order=4)
    var meta:HashMap<String,String> = HashMap<String,String>()

    @DataMember(Order=5)
    var responseStatus:ResponseStatus? = null
}

open class Customer
{
    var customerId:String? = null
    var companyName:String? = null
    var address:String? = null
    var city:String? = null
    var region:String? = null
    var postalCode:String? = null
    var country:String? = null
    var phone:String? = null
    var fax:String? = null
    var orders:ArrayList<Order> = ArrayList<Order>()
}

open class Order
{
    var orderId:Int? = null
    var customerId:String? = null
    var orderDate:Date? = null
    var total:Double? = null
}

Kotlin QueryGitHubRepos DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other

HTTP + OTHER

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /jsonl/reply/QueryGitHubRepos HTTP/1.1 
Host: sharpscript.net 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"userName":"String","skip":0,"take":0,"orderBy":"String","orderByDesc":"String","include":"String","fields":"String","meta":{"String":"String"}}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"offset":0,"total":0,"results":[{"id":0,"name":"String","description":"String","homepage":"String","language":"String","watchers_Count":0,"stargazes_Count":0,"forks_Count":0,"open_Issues_Count":0,"size":0,"full_Name":"String","created_at":"\/Date(-62135596800000-0000)\/","pushed_At":"\/Date(-62135596800000-0000)\/","updated_At":"\/Date(-62135596800000-0000)\/","has_issues":false,"has_Downloads":false,"has_Wiki":false,"has_Pages":false,"fork":false,"owner":{"id":0,"login":"String","avatar_Url":"String","url":"String","followers":0,"following":0,"type":"String","public_Gists":0,"location":"String","company":"String","html_Url":"String","public_Repos":0,"created_At":"\/Date(-62135596800000-0000)\/","blog":"String","email":"String","name":"String","hireable":false,"gravatar_Id":"String","bio":"String"},"svn_Url":"String","mirror_Url":"String","url":"String","ssh_Url":"String","html_Url":"String","clone_Url":"String","git_Url":"String","private":false}],"meta":{"String":"String"},"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}