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 vote
2 answers
602 views

Retrieve data from eBird API and create multi-level hierarchy of locations

As you may know, I like birds. The Cornell Lab of Ornithology has a tool called eBird where you can submit records of the birds you identified. I recently learned they have an API that I can query, ...
Raystafarian's user avatar
  • 7,129
14 votes
1 answer
1k views

Tick. Tick. *breathe* BOOM! - Setting up real, stable asynchronous callbacks with WinAPI Timers in VBA

WinAPI Timers can be quite tricky to work with, as anyone who's tried to use them and fallen foul of one of the many pitfalls probably knows. Problems such as screen freezing, crashes, uncontrolled ...
Greedo's user avatar
  • 2,345
10 votes
1 answer
262 views

Linq-to-Sage Implementation

Following-up on my last question where I wrapped the Sage API with a familiar IRepository interface, I decided to push the abstraction a step further, and... ...
Mathieu Guindon's user avatar
5 votes
1 answer
437 views

In-memory data cache architecture for data transfer

I am writing a cron job to manipulate and transfer remote data. I need to cache data from a table, process it, merge with previous table, iterate the process, and eventually send the result data to ...
Dmitri Zaitsev's user avatar
3 votes
2 answers
2k views

Structure of API wrapper

I'm building an API wrapper for a bookkeeping SOAP API. I have some questions regarding bast practice for structure of the wrapper and for error handling. For now i've structured it like this: ...
Stromgren's user avatar
  • 165
23 votes
3 answers
3k views

Parsing log files of HearthStone: The log reading API

I'm still working on a parser that can parse log entries from a game called HearthStone, the overall idea is that it will read the log file live when the game is running, parses the log file and show ...
skiwi's user avatar
  • 10.7k
15 votes
3 answers
5k views

Building a better Collection. Enumerable in VBA

VBA's 'Collection' is.... lacking, so, I've been working on a better Collection object that implements many of the features of C#'s Enumerable. This is very much inspired by this question and a follow ...
RubberDuck's user avatar
  • 30.8k
11 votes
2 answers
2k views

Parsing log files of HearthStone: The API

I am working on a parser that can parse log entries from a game called HearthStone, the overall idea is that it will read the log file live when the game is running, parses the log file and show ...
skiwi's user avatar
  • 10.7k
9 votes
3 answers
783 views

Carousel in Vanilla JavaScript

I finally got my carousel to work in JavaScript, and I want to know what you guys think about it and what I can do better. ...
Jordan Baron's user avatar
9 votes
4 answers
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 ...
drakebakincake's user avatar
8 votes
1 answer
347 views

Normalize whitespace and describe string

The most valuable of all talents is that of never using two words when one will do. Thomas Jefferson. NuGet and GitHub I found it useful to automatically normalize string content a little bit and ...
Dmitry Nogin's user avatar
  • 6,131
7 votes
2 answers
2k views

C++ wrapper for graphviz library

Background The code below is (obviously minimally) ripped out of a current live project. The project does reasonably sized data extraction, cleaning, analysis, clustering and visualisation (on a ...
Oliver Schönrock's user avatar
6 votes
4 answers
2k views

Conversion helper with support for enumerations and Nullable<T>

I recently wrote this code as a more versatile stand-in for Convert.ChangeType. I have a nagging feeling that there's something I might be overlooking, or that ...
Patrick's user avatar
  • 263
6 votes
1 answer
2k views

Change tracking POCO entities

Description In a time where thin clients, web browsers, web services and micro services are prevalent, we tend to forget we still have to deal with thick and smart clients. Many applications in B2B ...
dfhwze's user avatar
  • 13.9k
6 votes
2 answers
3k views

Safe and simple strtol()

Until today, in the few cases where I needed something like this, it had been in simple programs which only I used, and where I didn't care about security, so I used the simple ...
alx - recommends codidact's user avatar
6 votes
2 answers
531 views

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 usable perl hash, and ultimately obtain a date string. Once the date is obtained, it should recognize the ...
japtain.cack's user avatar
6 votes
1 answer
77 views

Wrapping the Sage300 View API with... a Repository

Related: Something like a LINQ provider I needed to work with the Sage300 View API. I had never worked with it, but my first impression has been that the API is ...
Mathieu Guindon'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
2 answers
8k views

Basic API wrapper around a Restful service

I'm writing a basic wrapper around a restful service that returns a list of Stores. I'm using RestSharp which I'm injecting into the class. Naturally, I want to make it completely testable (that's a ...
user2859298's user avatar
4 votes
1 answer
801 views

Secure Token for use in API calls

My team has developed an API and I've been tasked with creating an authentication layer that allows partners' applications to consume it. To that end, I've created a data store which houses an ...
Jesse C. Slicer's user avatar
4 votes
2 answers
205 views

Music Theory: The Basics - a Ring

I've recently started building an API that allows a consumer to create and manipulate musical entities such as notes, intervals, scales and chords. The first step is to create a a foundation of base ...
dfhwze's user avatar
  • 13.9k
4 votes
1 answer
171 views

PHP Authentication API

I created small simple PHP Authentication API. I have a couple of scripts that I use for session, authentication and registration. Since I'm not an experienced backend and PHP developer, I wanted ...
Sahbaz's user avatar
  • 341
4 votes
2 answers
334 views

PHP script that writes a JSON file with iextrading API data

iextrading has two APIs (v1, v2) which provide financial market data. Following script records a JSON file with their equity information (using a CRON job). Would you be kind and review it for any ...
Emma's user avatar
  • 3,487
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
3 votes
1 answer
471 views

Handling new user requests from a Swift client

I am starting to play with POST request to save in my server the user token so I can send push notifications in Swift (this is the Swift code). This is the PHP file that processes the request (please ...
Mat's user avatar
  • 327
3 votes
1 answer
933 views

Designing function prototypes for a singly-linked list API in C

I am in the process of rewriting in C all the data structures that I learned about a few years ago to increase my understanding of data structures and the C language. The first one I'm doing is singly-...
oddlogic's user avatar
3 votes
2 answers
706 views

Access a database and an API, uses python generators, and matches the results based on names, interview assignment

Thanks in advance if you are reading this code. I recently submitted this code as part of an interview (took about 4-5 hours). Unfortunately, they did not like the code and I received a form ...
Daniel R's user avatar
3 votes
2 answers
889 views

Implementing unified API data flow in ASP.NET Core

I have the API project on ASP.NET Core, and it's quite annoying always write methods like this: ...
Yurii N.'s user avatar
  • 187
3 votes
1 answer
147 views

Linq-to-Sage: CRUD Operations

Following-up on my Linq-to-Sage implementation, I ended up implementing all CRUD operations, following the Sage 300 view protocols. So, the entities derive from classes that look like this: ...
Mathieu Guindon'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
1 answer
116 views

JS Data Fetcher and Stripper for Statistics App

This is pretty much the first actual (not "hello world") program I'm writing. It's a rewrite of this app and my aim was to increase the fetch speed, and increase the cache storage efficency. I've more ...
timuzhti's user avatar
  • 223
2 votes
2 answers
196 views

Refactoring Logger interface to open and close logs

I asked a question about an implementation of a logger using syslog and error_log as fallback that made me re-evaluate my ...
Charles Sprayberry's user avatar
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 ...
AnkitSablok's user avatar
2 votes
1 answer
155 views

Authentication API script

I have coded a script that I run when I need to verify the authentication for a user, I use it as a php script and host it on api.mydomain.com. It just simply checks to see if the user details are ...
k239dk's user avatar
  • 31
2 votes
1 answer
191 views

Simple and reusable system for user registration and tracking and auto-updates

I created a bunch of small and mostly internal WPF applications for my company - usually for some file manipulation etc. For these programs, I would like to start collecting user info - who uses them, ...
Bartosz's user avatar
  • 211
1 vote
2 answers
262 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 ...
Ryan Stone's user avatar
0 votes
1 answer
307 views

Wrapper class for calling external API [closed]

I have a PHP cronjob script. I need to send requests and get responses from some external API. So, there is code for the API class. In this class, I connect to the API and call public methods of ...
Zhi V's user avatar
  • 151