Skip to content

Commit 30e6362

Browse files
committed
feat: financoop backend endpoints introspection
1 parent a5f6ba9 commit 30e6362

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

forms-bridge/addons/financoop/class-financoop-addon.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,22 @@ public function ping( $backend ) {
6969
return true;
7070
}
7171

72+
/**
73+
* Performs an introspection of the backend API and returns a list of available endpoints.
74+
*
75+
* @param string $backend Target backend name.
76+
* @param string|null $method HTTP method.
77+
*
78+
* @return array|WP_Error
79+
*/
80+
public function get_endpoints( $backend, $method = null ) {
81+
return array(
82+
'/api/campaign/{campaign_id}/subscription_request',
83+
'/api/campaign/{campaign_id}/donation_request',
84+
'/api/campaign/{campaign_id}/loan_request',
85+
);
86+
}
87+
7288
/**
7389
* Performs an introspection of the backend endpoint and returns API fields
7490
* and accepted content type.

0 commit comments

Comments
 (0)