[Docs] [Minor] Tweak `get_` & `delete_document` method signature to take both type `int` or `str`
See original GitHub issueDescription
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
Cheers!
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@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 astr
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 adict
(Hey @Luzkan, completely unrelated but what are you using as a tool to darken your views?)