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
-1
votes
0answers
19 views

Suggestions on REST API & Software Architecture Style [closed]

First of all i am student, so i need to know how compounds Interact with each other, Maybe next time in the future i will do it with a framework, but first thing I need to do is knowing how to build ...
1
vote
0answers
16 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
32 views

Initializing Google APIs serverside in MVC controller

I have this code in my MVC Controller: ...
2
votes
1answer
37 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
120 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
80 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'...
1
vote
0answers
24 views

SSIS and multiple API calls, a better way?

I am looking for some guidance on my solution as I am convinced there must be a better way. The below is my setup... SSIS Package API 1 - This calculates invoice totals and payments API 2 - This takes ...
4
votes
2answers
58 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. ...
1
vote
0answers
39 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
53 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
110 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
35 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 ...
2
votes
0answers
45 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 is just extending Guzzle and I'm using a factory method to initialize the client with the ...
1
vote
1answer
80 views

Fully finished my first ever python program

This is my first ever python project finished from start to end. This is the third iteration after posting twice before and using the feed back. This time I decided to add tkinter. Just seeing if ...
2
votes
1answer
60 views

Using Node.js, Express, and Express Router to implement a very simple REST API

To learn the ropes of Node.js and Express, I'm trying to implement a very simple REST API. The API says what it should do instead of doing it, so I can focus on the framework's structure. The ...
4
votes
1answer
56 views

Checking for duplicate email in api response data

I am working on a small internal app that works along an external API for provisioning purpose. The code essentially is comprised of a series of forms where the user inputs data, this data is then ...
1
vote
0answers
47 views

Ensuring secure API connection VBA

Earlier this year, I posted the following; Extract data from API using VBA & XML (Performance) The purpose of this project is/was to develop a small data extractor for our existing API to ensure ...
2
votes
1answer
47 views

Filtering out, a list of games, based on their followers

so I am playing with Rawg.io 's API. U can sort their game list by their release date, however there are just too many games. In their website, there's an option called "Popular only", which ...
8
votes
1answer
1k views

League of Legends Summoner Analysis

This program will ask for user to insert summoner and base from the last 20 games of said summoner, it will give avg stats and see if good or not by wins in last 20 games(a simple grading system). <...
2
votes
2answers
53 views

Get all data from an external and paginated Swagger API using Java / Feign / Spring

I have written the following method that allows me to import from another API all the items stored there using Feign. The only issue is that the external API provides a size limit of 2000 and ...
9
votes
4answers
3k views

Player data collection program

I'm working on a program that uses the RIOT API League of Legends for collecting player data and calculate how skilled a player is by using a grading system (as of right now it just the average of the ...
2
votes
1answer
63 views

Fast API path parameters from Enum Class

from enum import Enum from fastapi import FastAPI app = FastAPI() Hi Defined a route and a Enum Class for the same but the Enum Class looks ugly. ...
7
votes
2answers
161 views

Fetch StackOverflow questions and save them to a markdown table

I'm trying to write a script that would (a) fetch StackOverflow questions and (b) update a markdown table with new entries. With github actions I automated this script to run daily. Idea borrowed from ...
5
votes
1answer
66 views

Reddit Hangman Bot Python3

Back with another Reddit bot. This one provides games of Hangman to an arbitrary number of players simultaneously. Users interface with the bot by mentioning it for a new game. Once that game is ...
4
votes
1answer
74 views

Reddit Dictionary Bot Python 3

This bot uses the PRAW package and jisho.org API. While running, it looks at recent comments for summons. A user either requests a random Chinese character/Kanji and associated definitions or ...
1
vote
0answers
35 views

Representing a graph with passable marks and actions

I wanted to have a framework to build Petri Nets from C# code. Petri net is a digraph with functional transitions and mark types. In books they tend to look like this: Here is what I came up with - ...
1
vote
0answers
31 views

TypeScript Express.js proxy server overall design and structure

I have built a Express.js proxy server using TypeScript to be able to hide my front-end API keys. I designed it to be able to include multiple API services and to reject connections that are not from ...
2
votes
3answers
51 views

Track the existence of process

I have an api endpoint that, when called, initiates the generation of a report. This is time consuming process and response could come pretty late. So, we came up with caching architecture and once ...
7
votes
4answers
2k views

If/else produce code duplication

I have the following class: ...
2
votes
1answer
47 views

Reviewing the file download controller in spring rest

In my project, so this controller is working perfectly, my objective is to read the log file from the server which is created on daily basis, so I have to read the log file which is heavier in size ...
3
votes
1answer
24 views

Getting weather and cycling data (yr.no, oslobysykkel)

What I am trying to do, is to get weather data, data about bike trips and populate the postgresql database in order to be able to work with this data from Power BI/Tableau/any other tool. I have two ...
3
votes
1answer
33 views

IPython - Clipboard Extension

I often copy things from my terminal to other places (like Discord), and to make my workflow even easier I decided to use the IPython API to make an extension that has two magic functions ...
1
vote
1answer
36 views

Varying Parameter Names in Method Overloads

Probably a dumb question but just can't seem to make a decision here. I'm building a C# class library that I intend for other developers to use. Let's say one of these classes contains a method that ...
0
votes
0answers
26 views

Designing a public facing Java interface for future extensibility (API evolution)

I develop an in-house Java framework. I provide an interface so that my end users can provide their own custom implementation (i.e. plugin/SPI). ...
4
votes
1answer
55 views

Double linked list API design in C

I have created the following few functions for handling the use of doubly linked lists. list.c: ...
1
vote
1answer
16 views

Using a dictionary template for consistent response structure from an API

I am making a simple API for news items using Python and the Bottle framework. I return a Python dictionary from my endpoints as Bottle converts this to JSON automatically in the response to the ...
2
votes
0answers
38 views

Profitwell API wrapper build as Ruby gem

I've created my first gem in Profitwell API wrapper https://github.com/eebasadre20/profitwell. I love to get some feedback, comment, or suggestion on the code structure, method implementations, and so ...
4
votes
1answer
150 views

Access token regeneration for Axios requests

Description I've developed an application which use axios to communicate with the PayPal API. PayPal has a NodeJS SDK, but unfortunately this doesn't support the ...
0
votes
1answer
25 views

Getting data from API every x seconds and store it in a database

I'm currently getting data from an API every 15 seconds. This data contains a json with 100-2000 new items every time. Now i don't need all the items that are in there but still quite some of them and ...
2
votes
0answers
20 views

Web API wrapper design and sharing EF database context

I'm trying to keep my sanity while working with a legacy winforms application that uses an web api, both maintained by my team. In the past we have multiple cases of methods using wrong api endpoints,...
1
vote
1answer
37 views

Consuming an API with Pagination

Given a Tax type and city, access a REST API to get the total amount of taxes with the given type and at the given city. This information is to be grouped by users and ordered ascending by numerical ...
1
vote
1answer
61 views

Code structure of website API

I manage the Python API for the Manganelo (and Mangakalot) sites and I am not fully convinced that the code structure I currently use is the best. (https://github.com/nixonjoshua98/manganelo) The API ...
1
vote
0answers
84 views

Recursion - Max of integers in slice

Logical processors available on my machine: CPU(s): 4 Thread(s) per core: 2 So, 2x4 = 8 logical processors. But am currently using only 4 go-...
0
votes
1answer
39 views

Python code for checking request headers [closed]

I am trying to validate a HTTP REST API request in my python code. It checks for some request headers (X-Foo and X-Bar) and two ...
5
votes
0answers
114 views

Extract data from API using VBA & XML (Performance)

EDIT: Added a block with the raw code at the bottom (suggested by a friendly user) First post here. I sincerely hope that I am doing everything by the book. Also, I want to thank you in advance for ...
1
vote
0answers
60 views

Checking if a user exists on the database and return user in JSON format

below code takes data (email,password,user type) from $_POST[] and use them to search whether a user exists on the database. If yes sends a JSON object to the ...
2
votes
2answers
426 views

Print Bitcoin price by getting JSON data using CoinDesk API

In this code in Python, I used an API called CoinDesk to get the Bitcoin price as JSON. I'm trying to follow the best practices in coding, so, I've used logging and I'm using a code formatter in my ...
1
vote
0answers
141 views

two foreign keys in one django model [closed]

I'm working on a project the scenario: teacher model then is the teacher has not a profile the institute which working at will upload the courses does this is written the way I have tried in the ...
1
vote
2answers
129 views

Javascript Anime Support Switch Statement for .animate() Api

This is a revision of a previous question that I asked (i.e. Check browser compatibility for RequestAnimationFrame and Vanilla JavaScript .animate() API), with new aspects that I have learnt in ...
4
votes
2answers
118 views

API for a progress display function

I want to create an object, that represents a progress output. In a GUI this would be a progress bar, in a console application it may be a text output, that can only be written, but not changed ...

1
2 3 4 5
10