bookops_worldcat.utils
Shared utilities module.
verify_oclc_number
verify_oclc_number(oclcNumber: Union[int, str]) -> int
Verifies a valid looking OCLC number is passed to a request and
Parameters:
Name | Type | Description | Default |
---|---|---|---|
oclcNumber |
Union[int, str]
|
OCLC record number |
required |
Returns:
Type | Description |
---|---|
int
|
oclcNumber |
Source code in bookops_worldcat\utils.py
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
|
verify_oclc_numbers
verify_oclc_numbers(oclcNumbers: Union[str, List]) -> List
Parses and verifies list of oclcNumbers
Parameters:
Name | Type | Description | Default |
---|---|---|---|
oclcNumbers |
Union[str, List]
|
list of OCLC control numbers for which holdings should be set; they can be integers or strings with or without OCLC # prefix; if str the numbers must be separated by comma |
required |
Returns: vetted_numbers: list of vetted oclcNumbers
Source code in bookops_worldcat\utils.py
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
|