Skip to content
Snippets Groups Projects
Commit d75959c1 authored by Romin's avatar Romin :eye:
Browse files

Add licenses to docstring

parent 06fdd933
Branches
Tags v0.11.8
No related merge requests found
......@@ -716,6 +716,8 @@ class ApiClient:
organizations = []
organizations.append(responsible_organization.serialize())
organizations[0]["responsible"] = True
if additional_organizations is None:
additional_organizations = []
for org in additional_organizations:
organizations.append(org.serialize())
data: dict = {
......@@ -976,16 +978,16 @@ class ApiClient:
"""
Looks up an organization based on its ror uri.
Some commonly used ROR uris:
"https://ror.org/04xfq0f34" -> RWTH Aachen
"https://ror.org/04tqgg260" -> FH Aachen
"https://ror.org/04t3en479" -> KIT
"https://ror.org/02kkvpp62" -> TUM
"https://ror.org/05n911h24" -> TU Darm
"https://ror.org/01k97gp34" -> TU Do
"https://ror.org/02gm5zw39" -> UKA
"https://ror.org/00rcxh774" -> Uni Köln
"https://ror.org/04mz5ra38" -> Uni Due
"https://ror.org/00pd74e08" -> Uni Mün
* "https://ror.org/04xfq0f34" <- RWTH Aachen
* "https://ror.org/04tqgg260" <- FH Aachen
* "https://ror.org/04t3en479" <- KIT
* "https://ror.org/02kkvpp62" <- TUM
* "https://ror.org/05n911h24" <- TU Darm
* "https://ror.org/01k97gp34" <- TU Do
* "https://ror.org/02gm5zw39" <- UKA
* "https://ror.org/00rcxh774" <- Uni Köln
* "https://ror.org/04mz5ra38" <- Uni Due
* "https://ror.org/00pd74e08" <- Uni Mün
"""
uri = self.uri("organizations", ror_uri)
return Organization(self.get(uri).data)
......@@ -1004,6 +1006,24 @@ class ApiClient:
def license(self, name: str) -> License:
"""
Returns the license that matches the name.
* "Apache License 2.0"
* "BSD 2-clause 'Simplified' License"
* "BSD 3-clause 'New' or 'Revised' License"
* "CC BY 4.0 (Attribution)"
* "CC BY NC 4.0 (Attribution-NonCommercial)"
* "CC BY NC ND 4.0 (Attribution-NonCommercial-NoDerivatives)"
* "CC BY NC SA 4.0 (Attribution-NonCommercial-ShareAlike)"
* "CC BY ND 4.0 (Attribution-NoDerivatives)"
* "CC BY SA 4.0 (Attribution-ShareAlike)"
* "Eclipse Public License 1.0"
* "GNU Affero General Public License v3.0"
* "GNU General Public License v2.0"
* "GNU General Public License v3.0"
* "GNU Lesser General Public License v2.1"
* "GNU Lesser General Public License v3.0"
* "MIT License"
* "Mozilla Public License 2.0"
* "The Unlicense"
"""
results = list(filter(
lambda license: license.name == name,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment