Compare commits

..

6 Commits

Author SHA1 Message Date
7d35f85c1b Updated README
Some checks failed
test-clients / pyinvoiceninja (push) Failing after 53s
2024-11-06 10:11:24 -05:00
3eaa187019 Fixed gitea action syntax error
Some checks failed
test-clients / pyinvoiceninja (push) Failing after 1s
2024-11-05 14:47:53 -05:00
d274bdad49 Testing gitea actions 2024-11-05 14:44:40 -05:00
ebc55fbf8d ADDED dotenv file for pytests 2024-10-22 16:12:28 -04:00
aefb0dc2ab CHANGED nix shell is more reproducible 2024-10-22 15:04:02 -04:00
249cf62fcc FIXED InvoiceNinjaClient ping function now obeys debugging flag 2024-10-22 15:02:24 -04:00
5 changed files with 20 additions and 4 deletions

View File

@@ -0,0 +1,10 @@
name: test-clients
run-name: ${{ gitea.actor }} is testing pyinvoiceninja
on: push
jobs:
pyinvoiceninja:
runs-on: invoiceninja
steps:
- run: echo "Hello world!"

View File

@@ -1,4 +1,4 @@
# Python Invoice Ninja SDK
# pyinvoiceninja
Inspired by the [official PHP SDK](https://github.com/invoiceninja/sdk-php), a
Python wrapper for Invoice Ninja's REST API.

View File

@@ -137,10 +137,10 @@ class InvoiceNinjaClient(object):
bool
True if the server response is OK, False otherwise.
"""
logger.debug(f'Pinging {self.base_url}/ping with headers {self.headers}')
self._log_debug(f'Pinging {self.base_url}/ping with headers {self.headers}')
server_response = requests.get(url=f'{self.base_url}/ping',
headers=self.headers)
logger.debug(f'Server response: {server_response.status_code}, {server_response.text}')
self._log_debug(f'Server response: {server_response.status_code}, {server_response.text}')
return server_response.ok

View File

@@ -1,4 +1,4 @@
{ pkgs ? import <nixpkgs> {} }:
{ pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/nixos-24.05.tar.gz") {} }:
with pkgs;

6
tests/test.env Normal file
View File

@@ -0,0 +1,6 @@
# Base URL of an Invoice Ninja instance
BASE_URL=
# API token for an Invoice Ninja instance
API_TOKEN=