github.com/tada-team/tdproto@v1.51.57/codegen/api_paths/team_paths.go (about)

     1  package api_paths
     2  
     3  import "github.com/tada-team/tdproto"
     4  
     5  var TeamPaths = []PathSpec{
     6  	{
     7  		Path: "/api/v4/teams",
     8  		Get: &OperationSpec{
     9  			Response:    []tdproto.Team{},
    10  			Description: "Get the list of teams on the server.",
    11  		},
    12  		Post: &OperationSpec{
    13  			Request:             tdproto.Team{},
    14  			Response:            tdproto.Team{},
    15  			Description:         "Create new team.",
    16  			RequestDescription:  ":tdproto:ref:`Team` object with fields of new team.",
    17  			ResponseDescription: ":tdproto:ref:`Team` of new team.",
    18  		},
    19  	},
    20  	{
    21  		Path: "/api/v4/teams/{team_id}",
    22  		Get: &OperationSpec{
    23  			Response:    tdproto.Team{},
    24  			Description: "Get team info.",
    25  		},
    26  		Put: &OperationSpec{
    27  			Request:             tdproto.Team{},
    28  			Response:            tdproto.Team{},
    29  			Description:         []string{"Update team settings.", "Must have admin rights."},
    30  			RequestDescription:  ":tdproto:ref:`Team` object with updated fields.",
    31  			ResponseDescription: "Updated :tdproto:ref:`Team` object of the team.",
    32  		},
    33  		Delete: &OperationSpec{
    34  			Response:            tdproto.Team{},
    35  			ResponseDescription: ":tdproto:ref:`Team` object of deleted team.",
    36  			Description:         []string{"Delete the team.", "Must have admin rights."},
    37  		},
    38  	},
    39  	{
    40  		Path: "/api/v4/teams/{team_id}/chats",
    41  		Get: &OperationSpec{
    42  			Response:    []tdproto.Chat{},
    43  			Description: "Get the list of chats in the team.",
    44  		},
    45  	},
    46  	{
    47  		Path: "/api/v4/teams/{team_id}/contacts",
    48  		Get: &OperationSpec{
    49  			Response:    []tdproto.Contact{},
    50  			Description: "Get the list of contacts of the team.",
    51  		},
    52  	},
    53  	{
    54  		Path: "/api/v4/teams/{team_id}/contacts/{contact_id}",
    55  		Get: &OperationSpec{
    56  			Response:    tdproto.Contact{},
    57  			Description: "Get contact details.",
    58  		},
    59  		Post: &OperationSpec{
    60  			Request:             tdproto.Contact{},
    61  			Response:            tdproto.Contact{},
    62  			Description:         "Update contact details.",
    63  			ResponseDescription: "Updated :tdproto:ref:`Contact` object.",
    64  		},
    65  		Delete: &OperationSpec{
    66  			Response:            tdproto.Contact{},
    67  			Description:         []string{"Remove contact from the team.", "Must have admin rights."},
    68  			ResponseDescription: "Removed :tdproto:ref:`Contact` object.",
    69  		},
    70  	},
    71  }