question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Docs] [Minor] Tweak `get_` & `delete_document` method signature to take both type `int` or `str`

See original GitHub issue

Description

Documents Documentation Page (#get-one-document) suggests using int, while the current implementation requires str. Same with delete_document and delete_documents.

Solution

Adjust the method signature parameter or documentation.

Currently, the str type is required in (according to docs):

  • Java
  • Go
  • Rust

The int type is passed in:

  • JavaScript
  • PHP
  • Ruby
  • Swift
  • Dart

Fork with Tweak

If it will be concluded that it’s best to tweak the method signature, then the fork is here (PR Here). Else, the docs can be updated to string parameters for these methods.

Images

image

image

Cheers!

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
sanders41commented, Mar 21, 2022

@alallema I didn’t consider taking both options. Since it works both ways maybe updating the type to take both would be an option. Then there would be no need for the user to convert an int to a str to prevent a type error. It gets converted to a string in the methods when putting it into the URL already so it would be one less step for the end user.

The exception would be if there is anywhere the parameter is added to a dict and passed in the request body instead of the URL, but I can’t think of anywhere currently where the id is passed as a parameter and added to a dict

2reactions
bidoubiwacommented, Mar 21, 2022

(Hey @Luzkan, completely unrelated but what are you using as a tool to darken your views?)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Does a method's signature in Java include its return type?
For Java is illegal to have two methods with the signature differing only by the return type. Try that: public class Called {...
Read more >
Signature
The signature of a method is the name of the method and the types in its parameter list. Signature. A signature looks like...
Read more >
Getting Started – Rossum API Reference
Just getting started with Rossum? Go through this documentation to find out anything you'll need to know, from import/export all the way to...
Read more >
JUnit primer - Lucene in Action, Second Edition
String, java.io.Reader , and native numeric types (such as int or float). Although various types of documents can be indexed and made searchable, ......
Read more >
Does a Method's Signature Include the Return Type in Java?
In this example, we have an int to Integer auto-box for the first parameter. However, there is no sum(Integer, String) overload for this...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found