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.
557
questions
3
votes
1
answer
149
views
Angular - Contact manager component with API
I am starting with the Angular and I need some support. I have watched some of the tutorials and lot of them are using things differently. I upgraded some tutorial with my own idea, but I am not sure ...
1
vote
0
answers
124
views
HaveIBeenPwned API
Please find my code for securely checking Haveibeenpwned for breached passwords
This code will only send a partial HASH over the internet (using HTTPS) and the second part of the HASH will be checked ...
8
votes
1
answer
129
views
ArXiV Technical Paper API Github Repo
My name is Ethan and I am trying to build an API for scaping technical papers to use for developers. Right now it only works for ArXiV but I would greatly appreciate some mentoring or a code review of ...
1
vote
0
answers
36
views
Managing TimeMachinesCorp POE clock via UDP
I've got a working implementation of a go program to talk UDP to
TimeMachinesCorp POE clocks.
This code is also in a github repo which notes things I know aren't implemented yet. I feel like there's ...
3
votes
0
answers
752
views
A simple Python script that crawls information about Youtube playlists and your watch history
You will need to follow this guide.
This is a Youtube crawler that crawls information about Youtube playlists, it uses Youtube Data API v3 and it crawls the title, url, description, count and videos ...
5
votes
1
answer
150
views
Looking for feedback on OOP for a trading bot on Kraken
I'm trying to build a Kraken portfolio bot and started out with a simple layout for loading the balances. If possible, I would like to get some feedback on this initial design.
The API key provided is ...
2
votes
0
answers
232
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 ...
3
votes
0
answers
290
views
PayPal Checkout API with PHP - Sending and retrieving additional data safely
I am learning to use the new API version of Paypal, and I have some doubts.
Note: I've tried this on https://www.sandbox.paypal.com and it works,
I have not done the tests on Live.
onApprove:
I ...
1
vote
1
answer
305
views
Laravel show and update currency from rest api
I need:
Daily save new exchange rates from the REST API in the database.
Return the current exchange rate for a given currency, the whole
table for a given day, the exchange rate for a given currency
...
3
votes
0
answers
258
views
Random Astronomy Photo: React app using NASA's Astronomy Pic of the Day API
Random Astronomy Photo
About the project
This is a React app that generates a random photo from NASA's Astronomy Picture of the Day (APOD) API along with some interesting facts about it. This is my ...
4
votes
1
answer
65
views
Logistics project that implements several shipping APIs
I have a Python logistic project that implements several shipping APIs using class inheritance. Each of those classes must do three things:
Fire requests to each endpoint with the proper parameters
...
1
vote
2
answers
201
views
Update person name in database
Can someone review this implemented solution and provide commentary the code is working well but will need refactor and improve this code.
...
0
votes
1
answer
121
views
Python API testing
I have written a rudimentary code in Python:
That reads the API collection from Swagger/Postman and extracts the
payload, link, and method
It creates the response with the token(Generated from the ...
0
votes
1
answer
64
views
Collect values from an api more quickly
To collect the values of an api, I use three loopings, I would like to know if it is possible to improve this method that I use.
a = 9625897
...
0
votes
1
answer
275
views
Updating active cards dynamically added by API
I am making a website where you can search through all the countries in the world. Once you have found a country you want more detail about you should be able to click and view a detailed page with ...
6
votes
1
answer
2k
views
A Python-program that makes successive API-calls
I wrote some code to make calls to a public API. The code is correct as required as usual. My goal is to make the code as self-explanatory, maintainable and robust as possible. I also tried to make ...
6
votes
3
answers
2k
views
CQS implementation with decorators
Edit
I've put all this into a nuget package and on github under "MetalCore.CQS" at https://github.com/MetalKid/MetalCore.CQS
End Edit
I've created a "framework" or more of a ...
1
vote
2
answers
454
views
Requiring query field to not be empty on search api
we have a RESTful API that includes an endpoint for search
apiserver/v5/search?q=[search text]
for any query, it passes it off to solr and returns the result like
...
1
vote
2
answers
1k
views
Vue 3 audio player
I have been working on an audio player with Vue 3 and the Napster API.
...
0
votes
1
answer
68
views
Posting data to endpoints [closed]
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 ...
4
votes
1
answer
114
views
API Client and usage implementation
I'm really bothered with my approach in this, as I'd like to use the client in multiple projects.
The client extends Guzzle and I'm using a factory method to initialize the client with the necessary ...
3
votes
1
answer
91
views
A controller for a Game Service
I have a Spring MVC controller but I'm not sure that it is a good or bad design. As far as I know, api versioning is missing but apart from that I implemented Swagger for documentation and added ...
0
votes
2
answers
679
views
Python RESTClient Class with asyncio and aiohttp
I've seen Using asyncio and aiohttp in classes but could not really figure out how to apply this to my own code.
The main idea of this code is to inherit from this RESTClient class whenever I build a ...
1
vote
0
answers
763
views
Restaurant Open Hours - Converting Json to human readable format
I am seeking a general code review.
Task:
Write a program that takes JSON-formatted opening hours of a restaurant as an input and outputs hours in more human readable format.
Input:
Input JSON ...
1
vote
2
answers
227
views
Refactoring Ruby recharge REST API wrapper by using class variables
I am trying to create an API wrapper for recharge (A Shopify subscription service), I am using the HTTParty gem
...
1
vote
1
answer
68
views
Check Google Sheet for emails, verify delivery by api and Subscribe via api Benchmark
The main objective of this bot to make fast and reliable automatic subscriptions to email newsletter for people, who filled the website form(submissions go to google sheet)
I had too many requests to ...
8
votes
2
answers
1k
views
Efficiently parsing JSON response data in python
I'm using this API to get information on sports-betting odds. I am then processing it in Python to discard the irrelevant information.
Here's what the response looks like:
...
5
votes
1
answer
634
views
FastAPI project - CRUD operations on database
recently I have been trying to educate myself on REST APIs.
As a part of that, I have created a small project using FastAPI in python and I would love to hear some feedback about it.
When I wrote this,...
3
votes
0
answers
95
views
Generative Python transformer hitting Github API
I'm working on a GPyT (generative python transformer) project and I have written the below script to download lots of Python files from github.com to train my model. It works fine, but there is a ...
2
votes
2
answers
4k
views
Dictionary operations on a Binary Search Tree data structure?
today I tried to code all the dictionary operations such as Search, Successor, Predecessor, Minimum, Maximum, Insert, Delete etc. for a Binary Search Tree data structure using the Java programming ...
0
votes
1
answer
77
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 ...
2
votes
0
answers
64
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
1
answer
97
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
1
answer
62
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
1
answer
44
views
0
votes
1
answer
137
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
0
answers
376
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 ...
3
votes
2
answers
406
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
1
answer
646
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 ...
1
vote
1
answer
56
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
1
answer
979
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
0
answers
47
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
1
answer
60
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
1
answer
683
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 ...
5
votes
1
answer
2k
views
Telegram Rest API client design
I'm working on a "framework" for Telegram bots and right now everything "just works". I'm now in the process of rethinking about what I wrote and one of the things I dislike a lot is how I implemented ...
1
vote
1
answer
224
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
1
answer
2k
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 ...
4
votes
1
answer
114
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,...
2
votes
1
answer
209
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
1
answer
110
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 ...