@@ -1886,34 +1886,66 @@ def delete_fork_relation(self):
18861886 r = self .gitlab ._raw_delete (url )
18871887 raise_error_from_response (r , GitlabDeleteError )
18881888
1889- def star (self ):
1889+ def star (self , ** kwargs ):
18901890 """Star a project.
18911891
18921892 Returns:
18931893 Project: the updated Project
18941894
18951895 Raises:
1896+ GitlabCreateError: If the action cannot be done
18961897 GitlabConnectionError: If the server cannot be reached.
18971898 """
18981899 url = "/projects/%s/star" % self .id
1899- r = self .gitlab ._raw_post (url )
1900- raise_error_from_response (r , GitlabGetError , [201 , 304 ])
1900+ r = self .gitlab ._raw_post (url , ** kwargs )
1901+ raise_error_from_response (r , GitlabCreateError , [201 , 304 ])
19011902 return Project (self .gitlab , r .json ()) if r .status_code == 201 else self
19021903
1903- def unstar (self ):
1904+ def unstar (self , ** kwargs ):
19041905 """Unstar a project.
19051906
19061907 Returns:
19071908 Project: the updated Project
19081909
19091910 Raises:
1911+ GitlabDeleteError: If the action cannot be done
19101912 GitlabConnectionError: If the server cannot be reached.
19111913 """
19121914 url = "/projects/%s/star" % self .id
1913- r = self .gitlab ._raw_delete (url )
1915+ r = self .gitlab ._raw_delete (url , ** kwargs )
19141916 raise_error_from_response (r , GitlabDeleteError , [200 , 304 ])
19151917 return Project (self .gitlab , r .json ()) if r .status_code == 200 else self
19161918
1919+ def archive_ (self , ** kwargs ):
1920+ """Archive a project.
1921+
1922+ Returns:
1923+ Project: the updated Project
1924+
1925+ Raises:
1926+ GitlabCreateError: If the action cannot be done
1927+ GitlabConnectionError: If the server cannot be reached.
1928+ """
1929+ url = "/projects/%s/archive" % self .id
1930+ r = self .gitlab ._raw_post (url , ** kwargs )
1931+ raise_error_from_response (r , GitlabCreateError , 201 )
1932+ return Project (self .gitlab , r .json ()) if r .status_code == 201 else self
1933+
1934+ def unarchive_ (self , ** kwargs ):
1935+ """Unarchive a project.
1936+
1937+ Returns:
1938+ Project: the updated Project
1939+
1940+ Raises:
1941+ GitlabDeleteError: If the action cannot be done
1942+ GitlabConnectionError: If the server cannot be reached.
1943+ """
1944+ url = "/projects/%s/unarchive" % self .id
1945+ r = self .gitlab ._raw_delete (url , ** kwargs )
1946+ raise_error_from_response (r , GitlabCreateError , 201 )
1947+ return Project (self .gitlab , r .json ()) if r .status_code == 201 else self
1948+
19171949
19181950class TeamMember (GitlabObject ):
19191951 _url = '/user_teams/%(team_id)s/members'
0 commit comments