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.

89 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
6 votes
0 answers
466 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 ...
Simon's user avatar
  • 61
6 votes
0 answers
563 views

nodejs 401 request retry mechanism

I'm working on a project in which I have a backend in nodejs and from there I need to call external APIs, those APIs require authentication token which is valid for 15 minutes. So if response status ...
Abhay Sehgal's user avatar
5 votes
0 answers
1k 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 ...
Peder C's user avatar
  • 59
5 votes
0 answers
263 views

Entity component system Lua API

The destruction of the objects are handled by the garbage-collector metamethod. (Does this make sense? This means that an out-of-scope object will stay visible in game until garbage collection.) The ...
akaltar's user avatar
  • 181
5 votes
1 answer
116 views

Function outcome: consistent approach and easy logging

My goal is to make a consistent and easy way to determine how a function fails/succeeds. I'm looking for code review of my Status class for any bad practices, code ...
sazr's user avatar
  • 191
5 votes
1 answer
170 views

GitHub API client

Here is my Haskell program designed to list all of my GitHub repos along with their descriptions and languages via the GitHub JSON APIs: ...
Richard Cook's user avatar
4 votes
0 answers
50 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 ...
Nitwit's user avatar
  • 501
4 votes
0 answers
123 views

One interface for multiple CRUD resources

I asked about an abstraction layer for accessing files (link) a couple of days ago (I decided to not call it a follow-up anymore as there are too many changes). I tried to incorporate many of the ...
t3chb0t's user avatar
  • 44.2k
4 votes
0 answers
670 views

Scraping website and print them via routers

I've been working on a personal project for a while which simply extracts some information from a website and save them as JSON files. Then I've decided to move those scraping functionalities to the ...
kondanta's user avatar
4 votes
0 answers
827 views

Update UI once all API calls are done

I'm learning Swift at the moment but I would like to produce well-organised code. The goal of my little app is to display the weather of my current location. I use : the API of Darksky : https://...
Adrien G's user avatar
4 votes
0 answers
51 views

Texplode KotH controller

I am creating a KotH (King of the Hill) challenge for Programming Puzzles and Code Golf. Other site users will write programs that play Texplode (a version of this game on a square grid). The program ...
wizzwizz4's user avatar
  • 323
4 votes
0 answers
138 views

Core class of a JavaScript framework for Single-Page-Applications

A few years ago I started building a tiny (~300 SLOC) JavaScript framework for scalable and maintainable Single-Page-Applications written in CoffeeScript. GitHub www.scaleapp.org It's inspired by ...
flosse's user avatar
  • 121
3 votes
0 answers
90 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 ...
Hooman Bahreini's user avatar
3 votes
0 answers
698 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 ...
Ξένη Γήινος's user avatar
3 votes
0 answers
250 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 ...
jennsparkles's user avatar
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 ...
Xus's user avatar
  • 183
3 votes
0 answers
368 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 ...
Steel Hard's user avatar
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 ...
nick_rinaldi's user avatar
3 votes
0 answers
95 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'...
dustytrash's user avatar
  • 2,406
3 votes
0 answers
58 views

Reduce cluttering in a VPN initialization dance implementation (html, xml extraction and api calls) in Go

I'm still rather new to Go and I wanted to convert a part of a Python script I wrote a while ago to perform the VPN initialization dance (basically a set of API calls + parsing to fetch an auth cookie ...
Natalie Perret's user avatar
3 votes
0 answers
311 views

Middleware which lets developer maintain dynamic context

Problem Statement: Users can chat while the replies of the chatbot are based on past messages. So the chatbot needs to have the context of the previous messages and reply accordingly. Here is ...
Vraj Shah's user avatar
3 votes
0 answers
134 views

Wrapping a C API to be implemented in rust

I'm writing a Rust library to facilitate implementing the following C API in Rust. That is, it should be possible to create a Rust-idiomatic implementation by depending on my wrapper library. ...
stewbasic's user avatar
  • 203
3 votes
0 answers
63 views

Node Based Code Flow Builder

Background In my development of a game engine, I realized the need to be able to construct processing units in a serializable way (code below does not show serialization, just the wiring). I broke ...
Zymus's user avatar
  • 187
3 votes
0 answers
286 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 ...
Learning and sharing's user avatar
3 votes
0 answers
66 views

Rest API in a trimmed model

I practiced my Java knowledge in the last couple of days. For that, I want to create a Rest API in a trimmed scale, because there a lot of aspects which must be considered in such an API (Login, ...
user2622344's user avatar
3 votes
0 answers
296 views

User registration in Actix w/ DynamoDB

I am trying to puzzle out api based user registration for a service I am building, but I have a strong feeling that my code is not optimal. It feels like passing "state" in the way I did prevents the ...
Ethan McCue's user avatar
3 votes
0 answers
1k views

Python script for OpenStack health check

First time moving from Bash to Python for scripting and looking for feedback/improvements. I've spent the weekend learning about OOP, and am aware that not fully utilizing it in this script — so any ...
n7s's user avatar
  • 131
3 votes
0 answers
93 views

Implementing secure API for use between other internal apps

My team and I are trying to implement a secure API and would appreciate some feedback on the following: If there are areas of improvement in the current code to improve security Recommendations on ...
Kay E's user avatar
  • 31
3 votes
0 answers
111 views

Retrieving data from the movie database

I am trying to retrieve the series, seasons and episodes from the movie database, however I am pretty new to Ruby on rails and I feel like what I am doing could be improved a lot. I use an ...
L. Faros's user avatar
  • 233
3 votes
0 answers
49 views

oEmbed provider servlet to handle four media types

I would like to add oEmbed tags to my site (I'm the oEmbed api provider). My api should respond the results based on the file type. oEmbed Types has Photo Video Link Rich My response to photo ...
Tom Taylor's user avatar
3 votes
0 answers
115 views

Load data from WebAPI to the ViewController

My current code working perfectly, it is for data load from web api to the UIViewController (UITableView). But I am confused ...
Nazmul Hasan's user avatar
3 votes
0 answers
70 views

A function that debits a virtual wallet and calls an API to disburse to a real account

I am trying to determine if there is a better way to handle reversals for this function. This is how it works: A user inputs in amount, bank, and account number this would be used to debit his ...
temiloluwa adesina's user avatar
3 votes
0 answers
220 views

Perl nagios plugin to query an api, obtain date from json, and determine if the date is within thresholds

This is an update of Using an API to obtain JSON data and get the date string and determine if data is stale This is a nagios check that will use an API URL, get JSON data, flatten the data into a ...
japtain.cack's user avatar
3 votes
0 answers
313 views

Uploading series of large files to API via Node

I wrote a node script to traverse a folder of hour-long mp3s and upload them to Mixcloud via their API. It works, but I suspect it's fairly inefficient - the computer it's going to run on at our radio ...
Conan's user avatar
  • 131
3 votes
0 answers
15k views

JWT - Simple API example

I have created this fake API just because I want to learn how to use JWT. It is a simple unsigned token exchange with two methods call: login and adminPassword. I've used https://github.com/lcobucci/...
Thom Thom Thom's user avatar
2 votes
0 answers
63 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 ...
YFDev's user avatar
  • 21
2 votes
0 answers
213 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 ...
Benb27's user avatar
  • 21
2 votes
0 answers
44 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 ...
Christian LSANGOLA's user avatar
2 votes
0 answers
732 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 ...
amos-baron's user avatar
2 votes
0 answers
96 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 ...
Pepeng Agimat's user avatar
2 votes
0 answers
35 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,...
Rubens Farias's user avatar
2 votes
0 answers
36 views

Splitting environments: prod and dev modes

I've decided on splitting my environments keeping them in .js files in an environment folder and keep all the sensitive information in .env file (use a third-party module 'DOTENV'). That's what I've ...
Valary o's user avatar
  • 171
2 votes
0 answers
61 views

Library/API: simple springboot / jdbc query builder and ORM

I have been using and developing a simple ORM and query builder library that I have found useful in it's practical application. I am pretty sure there are improvements to be made, and I welcome any ...
rmalchow's user avatar
  • 121
2 votes
0 answers
42 views

Command String Parser

I'm working on a library that, in essence, splits a string at whitespace, with extra rules: Consecutive whitespace is collapsed, and trimmed at the start and end. Whitespace wrapped in quotes is not ...
Ethan McTague's user avatar
2 votes
0 answers
102 views

Google drive backup robot

I have a lot of files. I care about those files. I also care about good programming practices and learning proper python. Given the described context, it seemed appropriate to implement my own ...
sage's user avatar
  • 307
2 votes
0 answers
155 views

WordPress rest api basic auth with IP check

I'd like to use basic auth with the WordPress API, but restrict the capability to a single IP address. I've updated the existing code from here: https://github.com/WP-API/Basic-Auth accordingly. It ...
nzt's user avatar
  • 121
2 votes
0 answers
446 views

PHP project with Google Calendar API

I'm playing with a simple (for now) project in PHP with Google Calendar API. I have posted the code here in order to improve my programming style about whatever you think it's worth suggesting. Thank ...
GabrieleMartini's user avatar
2 votes
0 answers
78 views

TDD for Ruby On Rails API for group event items

I found myself working in this coding exercise for a work offer. I tried to apply TDD in the process but I didn't get any feedback from the company and I really would like to know what can be improved ...
Ibrah's user avatar
  • 21
2 votes
0 answers
404 views

Wrapping a web scraper in a RESTful API

The problem I am looking to solve is wrapping a web scraper in a RESTful API such that it can be called programmatically from another application, frontend or microservice. The overall goal is that ...
25Postcards's user avatar
2 votes
0 answers
71 views

Best approach to parse data from multiple APIs to Entities in PHP

I built an application that extracts and updates data from multiple ecommerces websites. Each eCommerce is either built using platforms/frameworks such as Shopify, Prestashop or WooCommerce. This ...
db306's user avatar
  • 121