Questions tagged [api]

API, for code implementing (NOT using) an Application Programming Interface. A program's API defines the proper way for a developer to request services from that program, site and/or service.

Filter by
Sorted by
Tagged with
-2
votes
0answers
22 views

API for input stream with read until [closed]

I want to create a stream class The input stream should read/parse a continuous range from left to right providing convenience methods. The implementation isn't a problem but choosing a consistence ...
1
vote
1answer
31 views

API for general boolean flag set

Very simple question. Imagine are designing library API, where you want to provide way to switch boolean flag. Typically to disable or enable a functionality. For argument's sake, let's say it's ...
0
votes
0answers
36 views

Submitting a form making POST request [closed]

I have a simple form with an inputs checkbox,star ratings icons with textarea and submit button. I want to loop through input checkbox values. When the rating is set, the user is prompted with a text ...
2
votes
0answers
22 views

Copy images using curl to make API calls

I am a junior web developer currently doing my first internship and I had a lot of freedom to solve small problems the way I thought was best. (There aren't really any developers here so I am ...
1
vote
1answer
49 views

Python script that get a web API

I've written a program that gets the web API endpoint for some functions on a website. I'm just wondering if you guys see anything I could do to improve the code at all. ...
1
vote
1answer
49 views

Automatic notification system about changes to court cases

I have written an application for lawyers' offices. There is an API to fetch info about court cases. I have implemented API calls for front end when user enters particular case; one tab is filled with ...
1
vote
1answer
27 views

React component with axios calls

...
0
votes
1answer
114 views

Good practices for a class

I was working in a class, but there are a lot of things that I'm not sure if they're a good practice or not. For example, the => instead of the ...
3
votes
0answers
46 views

Speed Up API Requests & Overall Python Code

I'm not asking for help solving a problem but rather asking for help for possible ways to improve the speed of my program. Essentially what this does is: Tracks market data by pulling the data from ...
2
votes
1answer
32 views

API design of library for argument inspection & filtering

I wrote the following Python library for getting a callable's argument names, testing whether a callable takes an argument with a given name, and filtering a dict ...
0
votes
0answers
26 views

How to most efficiently make repeated calls to API with Pandas/Python

Looking for some help on how to speed up the code below as I'm still relatively new to using Pandas. The playoff_stats function makes thousands of calls to the PlayerCareerStats API - and while it ...
3
votes
2answers
251 views

To-do app API made with Slim 3

I have put together the back-end (API) with the Slim framework (v3) and MySQL. In index.php I have: ...
1
vote
1answer
53 views

Read and display JSON results from Google Books API

I’m working with the Google Books API and I’m not so sure about the way I’m going to get the search data and return it to the user. I will describe the path here and I would like to know if you would ...
0
votes
0answers
24 views

Microsoft Academic API wrapper

Description This is my attempt at writing a wrapper around Microsoft's research API (evaluate endoint). My goals were: learn how to write classes does it look ok overall? should all methods except ...
1
vote
1answer
32 views

Posting data via fetch and handling network errors

I've built a login panel, which will submit an email and password via fetch/POST. And I wanted to know the best way to handle network status errors? Reason being, as I want to inject error messages ...
1
vote
1answer
70 views

How can I optimise a foreach calling an API? The code calls an API and returns the first string reponse

I have the following code that makes a call to an external API, processes the response and returns a string. The problem is it is taking a very long time to process. I can't do anything to the API, ...
3
votes
0answers
29 views

Logical next step in Django newsfeed web app

I'm hoping to get feedback on my current code from someone more experienced in Django, and in the concepts I'm trying to implement. Let me preface by saying that I am a novice to Django. This is my ...
1
vote
1answer
34 views

Query messages and 'bold' part of a message. Show one query at a time but get the next query in advance for better user experience

In this react component I'm trying to display one message on the screen at a time. This message has a 'bold' substring in it which should be accounted for. There's 2 endpoints here, ...
2
votes
1answer
51 views

Query the github api and filter the last 1000 commits which include and exclude certain words from the top 3 repositories in a given organization

This code should query the github api and filter, out of the last 1000 commits, which ones include and exclude certain words from the top 3 repositories in a given organization. For example, I could ...
-1
votes
1answer
39 views

Better way to keep a list of items from a Http Request?

I have a simple web api where each request "item" is stored in a list and thus a list is built without creating a new list per request. I have achieved this via dependency injection , but I ...
1
vote
1answer
69 views

Web scraping cars

Is there any way to lower the lines of this code and make it better in terms of being more Pythonic? The program collects data from truecar.com and then puts them ...
0
votes
1answer
197 views

Retrieve filename and ID with Google Drive API in C#

I am trying to retrieve filename and ID list with Google Drive API (the latest Drive API version v3 is used here) as a first step in order to analyze and manipulate these files on Google Drive. The ...
1
vote
1answer
231 views

Instagram Basic Display API Full Example PHP

Here's an example script I wrote for Instagram (Facebook)'s Basic Display API. I did this for myself because I haven't used Instagram's API since their Legacy API was disabled, and I needed to ...
4
votes
1answer
44 views

Single end point REST API

I want to ask question about a better way for implementing single endpoint REST. I want to build a rest API but I want it to only have single endpoint like: graphql,...
0
votes
1answer
18 views

Go Web API for Sending Emails via Contact Form

I've been playing around with Go and finally found a use case for a little web service I could build. It takes JSON data via an HTTP POST request and sends me an email via Mailgun's API (it's used for ...
0
votes
0answers
35 views

Optimize Yahoo Finance Code for Analysis

I am trying to analyze a number of companies using financial data I gathered from Yahoo Finance. I am also using the yfinance API to get some more details about the company using functions. Since I am ...
1
vote
1answer
40 views

Populate database of web articles

What I have here is a relatively simple endpoint for a small site I'm making. Idea is to take: title content tags and create an entry in the database. It works properly. I threw this together as ...
0
votes
1answer
31 views

Merge into an object from two different API calls

I'm working on an app to compare SDKS (their churn and acquisiton rates). I have created an API with two separate endpoints. The first, compares one sdk to ther other and spits out that data for each ...
1
vote
1answer
53 views

Posting data to endpoints

Here's the code I am trying to refactor. The same Http client is being used in each nested try with resource. I don't understand the rationale behind nesting client.execute() calls. The code tries to ...
3
votes
1answer
61 views

Carousel Using Vanilla Javascript

As a beginner project, I've start working on this carousel slider that would slide through an image and a testimonial on click. The number of images and content slides would always be the same number. ...
0
votes
0answers
62 views

Swagger API with Gorm DB connection

I have an API Swagger generated, I'm not satisfied with how I'm handling my part of the contract e.g. how I have constructed my db and ...
2
votes
0answers
68 views

Python REST API Data Extraction with requests library

Is there a better way to write this piece of code to extract data from a REST API with the requests library? It currently takes about 10 minutes to finish extracting the data from the REST API. I ...
-1
votes
1answer
61 views

Adding a new class property == new API version?

I have the following code: ...
1
vote
0answers
35 views

Secure GraphQL API with REST auth layer

I have created a REST auth layer in front of my GraphQL API, I would like to know if it is secure enough or if I can improve anything, I will be adding more auth providers, in the end this API will ...
5
votes
1answer
213 views

Dynamic DNS IP Checker/Changer for Google Domains in Python

I needed a way to automatically update my IP forwarding rules on Google Domains for my home web server running behind my router. (I'm not paying for a static IP!). After writing a simple functional ...
2
votes
0answers
35 views

Tiny REST API for making CRUD operations on list of posts

This is not a question related to a bug.I've just created a very tiny node.js/express API for education purposes. I've created a very little ...
2
votes
1answer
70 views

Open Notify simple console application

I made this code in python using Open Notify API, there is something that I could improve? Im new to coding and I'm almost 4 hours understanding and coding this program that let you interact by some ...
3
votes
1answer
91 views

Golang Rest API

I want to ask if there is a better way to arrange this. Main concern is whether the store is set up in a good way and if passing Pointer to ProductRepository is a good idea or there are better ways ...
1
vote
0answers
221 views

NextJS API endpoint for a 'form backend' service

(This is using NextJs but there was no tag for that available) I'm building a form backend service, similar to Formspree. The user can create a form however they like on their frontend and submit it ...
9
votes
2answers
572 views

Microservice that fetches data from REST repository endpoints on Github

I have code in Python 3 where I fetch data from the GitHub API, and I want some advice on the architecture of this code. ...
1
vote
0answers
31 views

Creating a transaction with node-pg and Express

I'm trying to write a TRANSACTION with node-postgres in an Express API. [The code below works as it's supposed to, mostly ...
0
votes
0answers
34 views

Initializing Google APIs serverside in MVC controller

I have this code in my MVC Controller: ...
2
votes
1answer
52 views

How to approach separation of layers mapping response to model in Angular app?

I want to organize mapping for my Angular app so that code structure would clear for other developers and I want to have as less code as possible. I have an api service that is responsible for ...
4
votes
1answer
126 views

Riot Analysis Program

This is a riot analysis app. Collect data using the riot API and shows the user various data. Nothing too in depth. GUI file - This file is the GUI file for the program. I have the class that make the ...
3
votes
0answers
89 views

A wrapper library for League Of Legends API

I'm a new Rustacean, decided to make a wrapper for the LeagueOfLegends API. Focus is on simplicity, being able to make any API call with a simple function. I have not finished all functions however it'...
4
votes
2answers
62 views

Application to calculate scores of strings submitted to an endpoint

Recently submitted a code assessment and I was wondering what other's feedback might be. What red flags can you see? I included gradle file if you're interested in running the application locally. ...
2
votes
0answers
318 views

mongodb RESTfull api in python using fastapi and mongoengine

So I wrote a a RESTfull api for a mongodb with python3.7, fastapi and mongoengine and id love to get feedback on how I should make my code more readable, clean, and dry. basically there are 4 main ...
3
votes
1answer
57 views

Node.js package that retrieves data from an API, formats it and sends it out via email to a distribution list

I've created a Node.js package that retrieves data from Icinga (a monitoring platform), formats it and passes it off to a class that generates some HTML and then sends it all out as an email. The ...
2
votes
2answers
119 views

Adding some wait time between API requests to avoid overloading the server

In Shopify a product can belong to a collection. I have written a method which accepts an organisation. It would then get a list of collections that this organisation has from Shopify. Finally, it has ...
6
votes
0answers
125 views

Xero API Client in Django

I'm not actually that new to writing Python. But I've no formal training and have only learnt to build applications to solve problems for my job out of necessity. Starting to bring my existing skills ...

1
2 3 4 5
11