Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fs-client
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
it-bott-integrasjoner
fs-client
Commits
42b27b2b
Commit
42b27b2b
authored
3 years ago
by
Jonas Braathen
Browse files
Options
Downloads
Patches
Plain Diff
Always quote path arguments
parent
be101a44
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
fs_client/client.py
+23
-16
23 additions, 16 deletions
fs_client/client.py
with
23 additions
and
16 deletions
fs_client/client.py
+
23
−
16
View file @
42b27b2b
...
...
@@ -5,7 +5,7 @@ import urllib.parse
import
requests
from
typing
import
Any
,
Dict
,
Optional
,
Union
,
Tuple
,
Type
,
Iterator
,
Generic
from
urllib.parse
import
urljoin
,
urlparse
from
urllib.parse
import
quote
,
urljoin
,
urlparse
from
.models
import
(
Aktivitet
,
...
...
@@ -161,12 +161,12 @@ class FsEndpoints:
return
urljoin
(
self
.
baseurl
,
"
vurderingskombinasjoner
"
)
def
get_vurderingskombinasjon
(
self
,
vurderingskombinasjon_id
):
return
urljoin
(
self
.
baseurl
,
f
"
vurderingskombinasjoner/
{
vurderingskombinasjon_id
}
"
)
fs_id
=
quote_path_arg
(
vurderingskombinasjon_id
)
return
urljoin
(
self
.
baseurl
,
f
"
vurderingskombinasjoner/
{
fs_id
}
"
)
def
get_vurderingsenhet
(
self
,
vurderingsenhet_id
):
return
urljoin
(
self
.
baseurl
,
f
"
vurderingsenheter/
{
vurderingsenhet_id
}
"
)
fs_id
=
quote_path_arg
(
vurderingsenhet_id
)
return
urljoin
(
self
.
baseurl
,
f
"
vurderingsenheter/
{
fs_id
}
"
)
def
list_vurderingsenheter
(
self
):
return
urljoin
(
self
.
baseurl
,
"
vurderingsenheter
"
)
...
...
@@ -175,48 +175,55 @@ class FsEndpoints:
return
urljoin
(
self
.
baseurl
,
"
studentvurderinger
"
)
def
get_studentvurdering
(
self
,
studentvurdering_id
):
return
urljoin
(
self
.
baseurl
,
f
"
studentvurderinger/
{
studentvurdering_id
}
"
)
fs_id
=
quote_path_arg
(
studentvurdering_id
)
return
urljoin
(
self
.
baseurl
,
f
"
studentvurderinger/
{
fs_id
}
"
)
def
get_vurderingsresultatstatuser
(
self
,
resultat_id
):
return
urljoin
(
self
.
baseurl
,
f
"
vurderingsresultatstatuser/
{
resultat_id
}
"
)
fs_id
=
quote_path_arg
(
resultat_id
)
return
urljoin
(
self
.
baseurl
,
f
"
vurderingsresultatstatuser/
{
fs_id
}
"
)
def
get_vurderingstid
(
self
,
vurderingstid_id
):
return
urljoin
(
self
.
baseurl
,
f
"
vurderingstider/
{
vurderingstid_id
}
"
)
fs_id
=
quote_path_arg
(
vurderingstid_id
)
return
urljoin
(
self
.
baseurl
,
f
"
vurderingstider/
{
fs_id
}
"
)
def
get_studieprogram
(
self
,
studieprogram_id
):
return
urljoin
(
self
.
baseurl
,
f
"
studieprogrammer/
{
studieprogram_id
}
"
)
fs_id
=
quote_path_arg
(
studieprogram_id
)
return
urljoin
(
self
.
baseurl
,
f
"
studieprogrammer/
{
fs_id
}
"
)
def
list_studieprogrammer
(
self
):
return
urljoin
(
self
.
baseurl
,
"
studieprogrammer
"
)
def
get_studierett
(
self
,
studierett_id
):
return
urljoin
(
self
.
baseurl
,
f
"
studieretter/
{
studierett_id
}
"
)
fs_id
=
quote_path_arg
(
studierett_id
)
return
urljoin
(
self
.
baseurl
,
f
"
studieretter/
{
fs_id
}
"
)
def
list_studieretter
(
self
):
return
urljoin
(
self
.
baseurl
,
"
studieretter
"
)
def
get_semesterregistrering
(
self
,
semesterregistrering_id
):
return
urljoin
(
self
.
baseurl
,
f
"
semesterregistreringer/
{
semesterregistrering_id
}
"
)
fs_id
=
quote_path_arg
(
semesterregistrering_id
)
return
urljoin
(
self
.
baseurl
,
f
"
semesterregistreringer/
{
fs_id
}
"
)
def
list_semesterregistreringer
(
self
):
return
urljoin
(
self
.
baseurl
,
"
semesterregistreringer
"
)
def
get_kull
(
self
,
kull_id
):
return
urljoin
(
self
.
baseurl
,
f
"
kull/
{
kull_id
}
"
)
fs_id
=
quote_path_arg
(
kull_id
)
return
urljoin
(
self
.
baseurl
,
f
"
kull/
{
fs_id
}
"
)
def
list_kull
(
self
):
return
urljoin
(
self
.
baseurl
,
"
kull
"
)
def
get_kullklasse
(
self
,
kullklasse_id
):
return
urljoin
(
self
.
baseurl
,
f
"
kullklasser/
{
kullklasse_id
}
"
)
fs_id
=
quote_path_arg
(
kullklasse_id
)
return
urljoin
(
self
.
baseurl
,
f
"
kullklasser/
{
fs_id
}
"
)
def
list_kullklasser
(
self
):
return
urljoin
(
self
.
baseurl
,
"
kullklasser
"
)
def
get_organisasjonsenhet
(
self
,
organisasjonsenhet_id
):
return
urljoin
(
self
.
baseurl
,
f
"
organisasjonsenheter/
{
organisasjonsenhet_id
}
"
)
fs_id
=
quote_path_arg
(
organisasjonsenhet_id
)
return
urljoin
(
self
.
baseurl
,
f
"
organisasjonsenheter/
{
fs_id
}
"
)
def
list_organisasjonsenheter
(
self
):
return
urljoin
(
self
.
baseurl
,
"
organisasjonsenheter
"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment