Skip to content

Commit 98142f5

Browse files
committed
feature/dss-10-API_Modification for adding date and last modification on project
[ch62224](https://app.clubhouse.io/dataiku/story/62224/api-to-get-project-creation-and-last-modification-date) Two new method/routes added to reflect changes of PublicAPIProjectController (GET /projects/{projectKey}/interest, /projects/{projectKey}/timeline?itemCount)
1 parent a52cf37 commit 98142f5

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

dataikuapi/dss/project.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,29 @@ def set_permissions(self, permissions):
249249
return self.client._perform_empty(
250250
"PUT", "/projects/%s/permissions" % self.project_key, body = permissions)
251251

252+
def get_interest(self):
253+
"""
254+
Get the interest of this project. The interest means the number of watchers and the number of star.
255+
256+
:return: a dict object containing the project's interest
257+
:rtype: dict
258+
"""
259+
return self.client._perform_json("GET","/projects/%s/interest" % self.project_key)
260+
261+
def get_timeline(self, itemCount=100):
262+
"""
263+
Get a timeline of this project. The timeline consists of information about the creation of this project
264+
(by whom, and when), the last modification of this project (by whom and when), a list of contributors,
265+
and a list of modification. This list contains "itemCount" number of element (default: 100). If itemCount
266+
is greater than the real number of modification, itemCount is adjusted.
267+
268+
:return: a dict object containing a timeline
269+
:rtype: dict
270+
"""
271+
return self.client._perform_json("GET", "/projects/%s/timeline" % self.project_key, params = {
272+
"itemCount": itemCount
273+
})
274+
252275
########################################################
253276
# Datasets
254277
########################################################

0 commit comments

Comments
 (0)