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.

[Question] Array encapsulation functionality

See original GitHub issue

In the middle of the process of making a Pokédex-like application, I saw that this library provides some kind of array encapsulation, allowing to make several requests with just one function call.

P.getBerryByName(['cheri', 'chesto', 5])
    .then((response) => {
      console.log(response);
    })

However, I want to know how the process is made in order to know if this would transform several requests to the API in just one concatenated.

The idea was to use this to implement a search component in the application since the other way consist in making one request to the general endpoint and a singler request per element of the results in the first request. As result, this could lead a decrement of the requests made to the API.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
EchedeyLRcommented, Mar 29, 2022

Thank you for all of this.

0reactions
Naramsimcommented, Mar 29, 2022
Read more comments on GitHub >

github_iconTop Results From Across the Web

Creating a Class to Encapsulate an Array (How To) - Treehouse
In this video, we'll see how to explicitly cast a base type to a subtype and we'll introduce our second challenge—creating a class...
Read more >
How to encapsulate an array in Java - Stack Overflow
Container has a private int array ( numArray ) with his setter & getter. Main creates a Container object and uses it in...
Read more >
Encapsulation in Java - GeeksforGeeks
Encapsulation can be achieved by Declaring all the variables in the class as private and writing public methods in the class to set...
Read more >
Encapsulation – Programming Fundamentals - Rebus Press
Encapsulation is one of the fundamentals of OOP (object-oriented programming). It refers to the bundling of data with the methods that operate on...
Read more >
Encapsulation in Java | How to master OOPs with ... - Edureka
Encapsulation in Java can be achieved by: Declaring the variables of a class as private. Providing public setter and getter methods to modify ......
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