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
7
votes
3
answers
2k
views
A remote trading bot that runs on the CLI - first C++ project
I am looking for feedback about a working trading bot (which connects to the API of the deribit website and trades on that platform) I made. I am a beginner in C++ and would like to learn some good ...
3
votes
0
answers
39
views
Mongo C++ Driver: Insert
This update is based on a previous review where I tried creating a WriteConfig and a WriteConfigBuilder. I have updated this so ...
1
vote
0
answers
28
views
How to optimize authentication and authorization, API calls in a task management frontend application?
Let me give a brief explanation of the mini-application I've designed using Angular :
A simple login page that requires user email and password as credentials. Once logged in, the user is moved to a ...
3
votes
0
answers
136
views
Simulating Objects with Collections in VBA
Background
I am writing a VBA module which requires the functionality of a custom object. This object will support "regular" functions (UDFs) within the module.
Due to reasons beyond the ...
1
vote
0
answers
48
views
How to properly organise a backend API structure in ColdFusion (CF9)
I have written a very basic API for my client using ColdFusion.
Currently I have endpoints with cfm files for each endpoint at that location.
For example:
...
3
votes
1
answer
56
views
Creating an API secured only by the request signature
I'm trying to create an API that will receive requests from users without having to do a login request. They will just have a user id and a key. My intention is that they will use the key to create a ...
4
votes
2
answers
941
views
Simple load balancer
I would like to know the possible improvements in design and concurrency of the following load balancer:
ability to add/register new instance
keep max of 10 instances for load balancer
forbid ...
4
votes
1
answer
345
views
API Generator for Python [closed]
I'm currently working on my thesis to obtain a bachelor in software engineering, and i want to get some feedback from real developers of how useful this project can be in the real life.
the project is ...
2
votes
1
answer
55
views
Convention based OpenApi schema generation for dotnet and NSwag
So I am getting tired from adding the same [ProducesResponseType] attribute on my WebAPI controller methods over and over, and I thought there must be an easier, ...
4
votes
1
answer
113
views
C99 - Lexer for the Monkey Programming Language from the book "Writing An Interpreter In Go"
Below is a C version of a lexer for the Monkey programming language, originally written in Go, as presented in the book Writing An Interpreter In Go.
LOC: 371. (Excluding the tests.)
Language:
Copy ...
5
votes
2
answers
844
views
A String View Library in C
I was recently working through the PintOS projects and became curious if there was a better way to do some string processing in C. Specifically, instead of strtok_r,...
5
votes
3
answers
1k
views
2
votes
1
answer
63
views
Return a set of geodetic coordinates for a particular moment in time
Use case
The user is interested in supplying a timestamp of a particular moment in time. This python application will perform two astronomy calculations for a set list of planetary bodies:
Calculate ...
2
votes
1
answer
64
views
Users CRUD in fastapi using pymongo
I am building users API with CRUD operation in fastapi and i'd love to hear feedback about it. I have been exploring fastapi in the past weeks and im trying to create API with best practice (scalable -...
2
votes
1
answer
200
views
FastAPI repository endpoint for version control system
I am creating an API for a version control system. This is my first time creating an API (and a web project in general) and I wanted to get some feedback. I plan to connect this API to a frontend to ...
0
votes
1
answer
49
views
Updating class method to use data from new weather API endpoint while keeping same return value object structure as with old endpoint
I needed to update a class in Node.js that parses the response from a new weather API endpoint but still preserves the same object structure and key values from having been using the old weather API ...
0
votes
1
answer
72
views
C interface exception handling with C++ implementation
Whilst developing a bigger project, I was in need of having basic error handling inside the context of a C interface.
I came up with the following solution.
...
2
votes
1
answer
63
views
Emoji busy spinner for a textual bot that run lengthy async jobs and need to provide feedback
This is a small python API to be able to display a busy spinner using emojis for a textual bot that run lengthy async jobs without access to a percentage of completion and need to provide feedback so ...
0
votes
0
answers
48
views
Handling a subprocess' output in background threads and accepting user-provided sinks for the output
I have a PR swapping from Command::output() to a custom implementation using threads to handle the subprocess' stdout/stderr while the program is running, instead ...
4
votes
0
answers
52
views
API for operators and alerts
Note: The important chunks of code are pasted in the question but the larger representation of the app is available on GitHub.
Some time ago I was tasked to create a simple FastAPI app. I did manage ...
2
votes
1
answer
126
views
Action argument supporting multiple units as string
I've got a controller with two actions that need to support two units: hours & times. The url should read like this:
...
0
votes
1
answer
214
views
Spring Boot Account API with React Frontend and Identicon Integration
I have recently been exploring React and Spring Boot, and I would greatly appreciate your feedback on a practice application that I have developed. The application consists of a Spring Boot backend ...
2
votes
1
answer
188
views
Python REST API Calls Structuring
I am writing a python REST API library for Starburst and am trying to figure the best way to structure the code so it's dry but also easy to understand. Below is an example of code that is not dry.
...
6
votes
1
answer
678
views
Event manager for games written in C++17
This is a single header event manager that I'm using in my game.
Disclaimer
I ripped everything from these lovely people:
https://austinmorlan.com/posts/entity_component_system/
C++ Event System - ...
3
votes
0
answers
96
views
Building an API for an e-commerce system to allow third party software to import products
I am working on an e-commerce website called Shopless, which is similar to E-bay/Gumtree. Our website integrates with other DMS systems, in order to allow organisations to import products into our ...
2
votes
1
answer
42
views
Python Module for representation, calculus and rich comparisons between temperature scale instances
ToTemp is a temperature conversion package with Celsius, Delisle, Fahrenheit, Kelvin, Rankine, Réaumur, Newton and Rømer scales. With a documentation and already in PyPI.
The source code for the main ...
2
votes
1
answer
94
views
API design for Implementing NaN/Unknown values for custom numeric type
I'm gradually writing an arbitrary-precision arithmetic library for C++. I've decided it could be useful to have the default constructor produce an object of indeterminate value, rather than relying ...
6
votes
2
answers
1k
views
Python script to get and save data from a web API
I'm working as a system administrator (sort of), but learning Python on the side.
Life gave me a chance to apply that knowledge, since our organization is being provided cloud email service, and it ...
1
vote
1
answer
88
views
How can I create a stronger ETL Pipeline library?
I've written a module for running ETL pipelines. The goal was to standardize API use in pipelines while making the pipeline easy to create and maintain. I'm not a Python guru by any means, and I'm ...
1
vote
2
answers
138
views
Idiomatic Rust API to X11 displays
I am currently implementing a native Rust API to X11, especially around the XDisplay for a related project.
I chose an object-oriented approach:
...
1
vote
0
answers
490
views
Calling PagerDuty REST API to recursively fetch oncall info for a team
I am a beginnner and have put up a code that talks to pagerduty API and then it fethces oncall info for a team (get team id, get escalation policy id, then finally get on call info). response is ...
3
votes
1
answer
593
views
Movie app using fetch API
The code will create a new Movie class and then with the response of the API call, will render html using the data.
Although the code works, I imagine it will get quite convoluted, now that everything ...
2
votes
2
answers
646
views
5
votes
1
answer
228
views
Traverse/transform (xml) tree
I am trying to write a utility for transforming xml trees using single pass and specifying node handlers.
I used pugixml prior to this, and the library provides a ...
4
votes
1
answer
318
views
Recipe website with API and JSON using vanilla JS
I'm training JavaScript and using APIs. So I'm building a recipe website that lets you search ingredients and finds you recipes with it.
Here is the link:
https://www.themealdb.com/
I found some code ...
0
votes
1
answer
44
views
rust: Set configs from env and reuse it during app's lifetime [closed]
After writing a basic API with rocket, I'm trying to improve it, but I'm not sure how to follow up. Each time a new request comes in, the code keeps looking for the variable from the environment.
<...
2
votes
2
answers
1k
views
C# Binary Search Tree implementation
I have implemented a Binary Search Tree and would really appreciate it if someone could take time to check it and give me feedback.
I try to keep my code clear and simple.
Is it readable?
Is the API ...
0
votes
1
answer
62
views
Better localStorage API
I wasn't quite happy with the way localStorage handles non-string values, for example ...
3
votes
1
answer
328
views
API client that builds a response over multiple lines
I am performing a REST API call and I have copied their example code where they show how to perform such an api call. Their example is written in Javascript not Typescript though. To adapt the code I ...
3
votes
1
answer
154
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 ...
3
votes
0
answers
795
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
154
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 ...
3
votes
0
answers
270
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
82
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
211
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
131
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
66
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
282
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 ...
0
votes
1
answer
122
views
Basic ASP.NET Core RESTful API with Entity Framework Core
This is my first WIP backend asp.net application, which I will pair with react to create a full stack app. The thing I'm mostly worried about is model conversion to DTO and custom policy authorization,...