首页 > 其他分享 >2020-1-28-coding获取某个项目中的任务

2020-1-28-coding获取某个项目中的任务

时间:2023-09-17 19:22:05浏览次数:38  
标签:name coding 28 project 2020 type data id

layout: post
title: coding获取某个项目中的任务
categories: coding-post
background_music: '<iframe frameborder="no" border="0" marginwidth="0" marginheight="0" width=100% height=100 src="//music.163.com/outchain/player?type=2&id=554308724&auto=1&height=50"></iframe>'
tag: coding api

coding获取某个项目中的任务

警告,该接口数据量巨大,如果程序不完善,请降低last_id或调整type

接口URL

https://<team-name>.coding.net/api/project/<project-id>/activities?last_id=999999999&type=all&user_filter=0
请注意,是项目id非名称,id可通过获取项目列表查询

请求方式

GET

请求Query参数

参数 示例值 必填 参数描述
last_id 999 即到第999个任务的返回
type all 任务类型
user_filter 0

type有如下值可选:REQUIREMENT--需求;

请求header参数:

cookie:eid

成功返回参数

参数 示例值 参数描述
code 0 状态码
data ··· 具体数据
data.issueType REQUIREMENT 任务类型
data.issueName ··· 任务名
data.project ··· 从属项目名称
data.user ··· 项目负责人信息
data.issueCode 123 任务id
data.issueLog.content.priority 1 优先级,1为中
data.issueLog.content.due_date 9999-01-01 截止日期(这里是指没有)
data.issueLog.content.watchers ··· 关注者信息
data.issueLog.content.status ··· 任务状态
data.issueLog.content.iteration ··· 从属迭代信息
data.issueLog.content.working_hours ··· 工作时长
data.issueLog.creator ··· 创建者信息

数据太多,请各位自行解析

成功示例数据

{
	"code": 0,
	"data": [
		{
			"issueType": "REQUIREMENT",
			"issueName": "配置文件读取统一化测试",
			"target_type": "Requirement",
			"project": {
				"name": "UnitAi-project",
				"path": "/p/UnitAi-project",
				"full_name": "xutongxin/UnitAi-project",
				"display_name": "UnitAi-project"
			},
			"action": "create",
			"created_at": 1579774119000,
			"id": 3024312318,
			"type": "LOG",
			"user": {
				"name": "xtx",
				"path": "/u/yskcpdfwqeNA",
				"avatar": "https://coding-net-production-static-ci.codehub.cn/WM-TEXT-AVATAR-shRyeVzAOcdIIllXCioP.jpg",
				"global_key": "yskcpBsdeNA"
			},
			"issueCode": 35,
			"issueLog": {
				"id": 40421442,
				"issueActivityId": 431231769,
				"issueId": 21231687,
				"action": "CREATE",
				"target": "SELF",
				"targetName": "问题",
				"content": {
					"name": "配置文件读取统一化测试",
					"description": "",
					"priority": {
						"level": 1,
						"name": "中"
					},
					"due_date": "9999-01-01",
					"project_module": "",
					"labels": [],
					"watchers": [
						{
							"name": "xtx",
							"id": 11232145,
							"avatar": "https://coding-net-production-static-ci.codehub.cn/WM-TEXT-AVATAR-shRyeVzAOcdIIllXCioP.jpg"
						}
					],
					"status": {
						"color": "BLUE",
						"name": "未开始",
						"id": 6073419,
						"type": "TODO"
					},
					"assignee": {
						"global_key": "yskcpssdadNA",
						"name": "xtx",
						"id": 1192as35,
						"avatar": "https://coding-net-production-static-ci.codehub.cn/WM-TEXT-AVATAR-shRyeVzAOcdIIllXCioP.jpg"
					},
					"attachments": [],
					"working_hours": 0,
					"iteration": {
						"code": 10,
						"name": "主界面编写"
					},
					"custom_fields": []
				},
				"creator": {
					"id": 11das45,
					"status": 1,
					"globalKey": "yskcpBHeNA",
					"avatar": "https://coding-net-production-static-ci.codehub.cn/WM-TEXT-AVATAR-shRyeVzAOcdIIllXCioP.jpg",
					"name": "xtx",
					"email": "[email protected]"
				},
				"createdAt": 1579774119000
			}
		}
	}

失败返回参数

参数 示例值 参数描述
code 1046 状态码
msg ··· 错误原因描述

失败示例数据

{
	"code": 1000,
	"msg": {
		"user_not_login": "用户未登录"
	},
	"data": {
		"account_type": 0
	}
}

标签:name,coding,28,project,2020,type,data,id
From: https://www.cnblogs.com/xutongxin/p/17709522.html

相关文章

  • 《Java编程思想第四版》学习笔记28--关于StreamTokenizer
    //:SortedWordCount.java//Countswordsinafile,outputs//resultsinsortedform.importjava.io.*;importjava.util.*;importc08.*;//ContainsStrSortVectorclassCounter{privateinti=1;intread(){returni;}voidincrement(){i++;}}pu......
  • P6631 [ZJOI2020] 序列
    可以将问题用形象地方式来表述。给定一排点,第\(i\)个点有它需要的覆盖次数\(a_i\)。有两种线段,一种能覆盖连续的一些点,称其为连续线段;另一种能覆盖相邻间隔为\(1\)的一些点,称其为间隔线段。现在要用尽可能少的线段覆盖所有点\(i\)恰好\(a_i\)次。发现如果没有间隔线段就......
  • P3287 [SCOI2014] 方伯伯的玉米田
    首先每次选择的区间结尾都可以换成\(n\),仍然保持单调不降,我们就按这个策略拔高玉米。令\(f_{i,j}\)表示\(1\simi\)这段前缀进行了\(j\)次操作,第\(i\)株玉米不被拔掉,所能剩下最多的玉米数量:\[f_{i,j}=\max\{f_{p,q}|p<i,q<j,a_p+q\leqa_i+j\}+1\]枚举\(i\),剩下两个......
  • java == 和 equals 和 128以下整数
    Integera=127;Integerb=127;System.out.println(a==b);打印值为true而Integera=128;Integerb=128;System.out.println(a==b);打印值为false 因为:在Java中,不应该以这种方式比较对象。当您像a==b那样比较它们时,您比较的是引用,而不是值,值......
  • 2020-2021 ACM-ICPC Brazil Subregional Programming Contest
    A.StickerAlbum你想要得到\(n\)张贴纸,每包礼物中等概率出现\([A,B]\)范围内数量的贴纸,求需要买多少包礼物才能至少获得\(n\)张贴纸的期望次数\(1\leqn\leq10^6,0\leqA,B\leq10^6\)题解:期望DP我们考虑从后往前进行\(dp\)设计状态为\(dp[i]\)代表手上有\(i\)张......
  • CF1828B
    PermutationSwap题面翻译给你一个长度为\(n\)的未排序的排列。找到最大的整数\(k\)满足可以通过只交换下标差为\(k\)的元素使排列被从小到大排序。题目描述Youaregivenanunsortedpermutation$p_1,p_2,\ldots,p_n$.Tosortthepermutation,youchoosea......
  • 《Java编程思想第四版》学习笔记28
    //:PrintFile.java//Shorthandclassforopeninganoutputfile//forhuman-readableoutput.packagecom.bruceeckel.tools;importjava.io.*;publicclassPrintFileextendsPrintStream{publicPrintFile(Stringfilename)throwsIOException{super(n......
  • vs 远程调试工具2019 2020 ,visual studio
    https://learn.microsoft.com/en-us/visualstudio/debugger/remote-debugging?view=vs-2022#download-and-install-the-remote-tools这个是唯一的方法,如果是非最新的版本,就必须这样这是具体vs2019远程工具下载地址https://download.visualstudio.microsoft.com/download......
  • CF1828A
    DivisibleArray题面翻译构造一个长度为\(n\)的序列\(a\)满足以下条件。对于每个元素\(a_i\)满足\(a_i\le1000\)。对于每个元素\(a_i\)满足\(a_i\equiv0\pmodi\)。即每个元素\(a_i\)能被\(i\)整除。满足\(\sum_{i=1}^{n}a_i\equiv0\pmodn\)。即......
  • GYM 104128 G
    G.Inscryption根据题意,需要把输入的\(0\)全部转换为\(1\)或\(-1\),使得\(p\overq\)最大。当\(a[i]=1\)时,\({p\overq}={p'+1\overq'+1}\)当\(a[i]=-1\)时,\({p\overq}={p'\overq'-1}\)通过计算,可知当\(q>2*p+1\)时,\(a[i]=1\)时的收益大于\(a[i]=......