Giter Club home page Giter Club logo

oldp-sdk-python's People

Contributors

langhabel avatar malteos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

oldp-sdk-python's Issues

not_authenticated

Hey guys,

I would like to connect via API. For this I have run the installation with:
pip install git+https://github.com/openlegaldata/oldp-sdk-python.git

Then I copied your "Getting Started" example and replaced 'YOUR_API_KEY' with mine:

from __future__ import print_function
import time
import oldp_client
from oldp_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: api_key
configuration = oldp_client.Configuration()
configuration.api_key['Authorization'] = 'MY_api_key'
# configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = oldp_client.AnnotationLabelsApi(oldp_client.ApiClient(configuration))
data = oldp_client.AnnotationLabel(name="Fein", slug="muh") # AnnotationLabel |

try:
    api_response = api_instance.annotation_labels_create(data)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AnnotationLabelsApi->annotation_labels_create: %s\n" % e)

When I start the program now, 2 error messages come up immediately:

  • name and slug are missing in oldp_client.AnnotationLabel
    According to the documentation these values should be filled with "Verbose name, e.g. This Awesome annotation" and "Identifier, e.g. this-awesome-annotation".
    Could you flesh this out a bit in the example? I don't understand what is meant by this.
    When I enter anything for name and slug I get the following response:
Exception when calling AnnotationLabelsApi->annotation_labels_create: (401)
Reason: Unauthorized
HTTP response headers: HTTPHeaderDict({'Server': 'nginx/1.10.3', 'Date': 'Mon, 04 Sep 2023 14:39:43 GMT', 'Content-Type': 'application/json', 'Content-Length': '61', 'Connection': 'keep-alive', 'Vary': 'Accept, Accept-Language, Cookie', 'Content-Language': 'de', 'X-Frame-Options': 'SAMEORIGIN', 'WWW-Authenticate': 'Token', 'Allow': 'GET, POST, HEAD, OPTIONS'})
HTTP response body: {"message":"Anmeldedaten fehlen.","code":"not_authenticated"}

And where exactly can I enter my question to openlegaldata in the example?

Thank you very much :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.