Skip to content

Firefly III: a personal finances manager

Upgrade Spectre to v4

James Cole85d655d3e226
diff --git a/app/Services/Spectre/Request/CreateTokenRequest.php b/app/Services/Spectre/Request/CreateTokenRequest.php
index 7e1322d732..88fe1e6184 100644
--- a/app/Services/Spectre/Request/CreateTokenRequest.php
+++ b/app/Services/Spectre/Request/CreateTokenRequest.php
@@ -60,11 +60,9 @@ class CreateTokenRequest extends SpectreRequest
'return_to' => $this->uri,
],
];
- $uri = '/api/v3/tokens/create';
+ $uri = '/api/v4/tokens/create';
$response = $this->sendSignedSpectrePost($uri, $data);
$this->token = new Token($response['data']);
-
- return;
}
/**
diff --git a/app/Services/Spectre/Request/ListAccountsRequest.php b/app/Services/Spectre/Request/ListAccountsRequest.php
index 86a3700400..93191f9ed7 100644
--- a/app/Services/Spectre/Request/ListAccountsRequest.php
+++ b/app/Services/Spectre/Request/ListAccountsRequest.php
@@ -50,7 +50,7 @@ class ListAccountsRequest extends SpectreRequest
while ($hasNextPage) {
Log::debug(sprintf('Now calling ListAccountsRequest for next_id %d', $nextId));
$parameters = ['from_id' => $nextId, 'login_id' => $this->login->getId()];
- $uri = '/api/v3/accounts?' . http_build_query($parameters);
+ $uri = '/api/v4/accounts?' . http_build_query($parameters);
$response = $this->sendSignedSpectreGet($uri, []);
// count entries:
diff --git a/app/Services/Spectre/Request/ListCustomersRequest.php b/app/Services/Spectre/Request/ListCustomersRequest.php
index 5d06f0d862..809518a963 100644
--- a/app/Services/Spectre/Request/ListCustomersRequest.php
+++ b/app/Services/Spectre/Request/ListCustomersRequest.php
@@ -47,7 +47,7 @@ class ListCustomersRequest extends SpectreRequest
while ($hasNextPage) {
Log::debug(sprintf('Now calling ListCustomersRequest for next_id %d', $nextId));
$parameters = ['from_id' => $nextId];
- $uri = '/api/v3/customers/?' . http_build_query($parameters);
+ $uri = '/api/v4/customers/?' . http_build_query($parameters);
$response = $this->sendSignedSpectreGet($uri, []);
// count entries:
diff --git a/app/Services/Spectre/Request/ListLoginsRequest.php b/app/Services/Spectre/Request/ListLoginsRequest.php
index d2e87c2a7d..897269cae5 100644
--- a/app/Services/Spectre/Request/ListLoginsRequest.php
+++ b/app/Services/Spectre/Request/ListLoginsRequest.php
@@ -50,7 +50,7 @@ class ListLoginsRequest extends SpectreRequest
while ($hasNextPage) {
Log::debug(sprintf('Now calling ListLoginsRequest for next_id %d', $nextId));
$parameters = ['from_id' => $nextId, 'customer_id' => $this->customer->getId()];
- $uri = '/api/v3/logins/?' . http_build_query($parameters);
+ $uri = '/api/v4/logins/?' . http_build_query($parameters);
$response = $this->sendSignedSpectreGet($uri, []);
// count entries:
diff --git a/app/Services/Spectre/Request/ListTransactionsRequest.php b/app/Services/Spectre/Request/ListTransactionsRequest.php
index f662ed436c..59f62f4d11 100644
--- a/app/Services/Spectre/Request/ListTransactionsRequest.php
+++ b/app/Services/Spectre/Request/ListTransactionsRequest.php
@@ -50,7 +50,7 @@ class ListTransactionsRequest extends SpectreRequest
while ($hasNextPage) {
Log::debug(sprintf('Now calling ListTransactionsRequest for next_id %d', $nextId));
$parameters = ['from_id' => $nextId, 'account_id' => $this->account->getId()];
- $uri = '/api/v3/transactions?' . http_build_query($parameters);
+ $uri = '/api/v4/transactions?' . http_build_query($parameters);
$response = $this->sendSignedSpectreGet($uri, []);
// count entries:
diff --git a/app/Services/Spectre/Request/NewCustomerRequest.php b/app/Services/Spectre/Request/NewCustomerRequest.php
index 9e8140c20d..0049487123 100644
--- a/app/Services/Spectre/Request/NewCustomerRequest.php
+++ b/app/Services/Spectre/Request/NewCustomerRequest.php
@@ -43,12 +43,10 @@ class NewCustomerRequest extends SpectreRequest
'identifier' => 'default_ff3_customer',
],
];
- $uri = '/api/v3/customers/';
+ $uri = '/api/v4/customers/';
$response = $this->sendSignedSpectrePost($uri, $data);
// create customer:
$this->customer = new Customer($response['data']);
-
- return;
}
/**