You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+58-29Lines changed: 58 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,13 +15,15 @@
15
15
-[Adding Media to Record](#adding-media-to-record)
16
16
-[Removing Media from a Record](#removing-media-from-a-record)
17
17
-[Compare Two Revision Histories](#compare-two-revision-histories)
18
+
-[Searching and pagination](#searching-and-pagination)
18
19
-[Method Documentation](#method-documentation)
19
20
-[Configuration](#configuration)
20
21
-[Records](#records)
21
22
-[Revisions](#revisions)
22
23
-[Media](#media)
23
24
-[Classes](#classes)
24
25
-[Record](#record)
26
+
-[Query](#query)
25
27
-[Organization](#organization)
26
28
-[Person](#person)
27
29
-[Identifier](#identifier)
@@ -37,7 +39,6 @@
37
39
-[BadRequestException](#bad-request-exception)
38
40
-[NotFoundException](#not-found-exception)
39
41
-[ConflictException](#conflict-exception)
40
-
-[ValidationException](#validation-exception)
41
42
-[ServerException](#server-exception)
42
43
43
44
## Introduction<aid="introduction"></a>
@@ -51,17 +52,18 @@ This module is setup to mimic the E-Link 2.0 API Endpoints (API documentation fo
51
52
3. Or install them separately: `pip install requests pydantic urllib3==1.26.6`
52
53
4. Access the E-Link connector via `from elinkapi import Elink` and creating an instance for use with your API key: `api = Elink(token="Your_API_Token")`
53
54
5. API classes are accessible using `from elinkapi import Record`, etc.
54
-
6. Exception classes generated by the API are accessible using `from elinkapi import exceptions` then catching appropriate `exceptions.ValidationException` and the like.
55
+
6. Exception classes generated by the API are accessible using `from elinkapi import exceptions` then catching appropriate `exceptions.BadRequestException` and the like.
55
56
56
57
#### Importing the Package from Production PyPI<aid="importing-the-package-from-production-pypi"></a>
57
58
1. Install the package: `pip install elinkapi`
58
59
2. Access the E-Link connector via `from elinkapi import Elink` and creating an instance for use with your API key: `api = Elink(token="Your_API_Token")`
59
60
3. API classes are accessible using `from elinkapi import Record`, etc.
60
-
4. Exception classes generated by the API are accessible using `from elinkapi import exceptions` then catching appropriate `exceptions.ValidationException` and the like.
61
+
4. Exception classes generated by the API are accessible using `from elinkapi import exceptions` then catching appropriate `exceptions.BadRequestException` and the like.
61
62
62
63
## Examples<aid="examples"></a>
63
64
64
65
#### Creating a New Record<aid="creating-a-new-record"></a>
66
+
Note: Ensure site_ownership_code is a value to which your user account token has sufficient access to create records.
Raised on validation errors with submissions of metadata. Additional details are available via the `errors` list, each element containing the following information
621
+
Raised when provided query parameters or values are not valid or not understood, or if validation errors occurred during submission of
622
+
metadata. Additional details are available via the `errors` list, each element containing the following information
601
623
about the various validation issues:
602
-
- status: usually 400, indicating a Bad Request error
603
624
- detail: an error message indicating the issue
604
625
- source: contains a "pointer" to the JSON tag element in error
0 commit comments