Request for feedback: Edit API with PHP for a specific purpose. (Details below)

Discussion space for community admins

Moderators: rmvanarkel, hugo, alexandre

Post Reply
xpek55
Posts: 13
Joined: Fri Sep 21, 2018 2:30 pm

Request for feedback: Edit API with PHP for a specific purpose. (Details below)

Post by xpek55 »

Greetings! I am looking for answers about specifically addressed questions. Its a few about specific ideas.

I have a community site, which I editing and administrating since 2018 (its upgraded also) and read a lot about the functions, website customizations, cyclos documentation also red multiple times and the environmental setup of API. Also I try to figuring out many new ideas and implement beneficial details as best as possible. :)

My first question: How can I use/edit the API functions of my site, to make them accessable/editable with PHP or different API compatible environment?

Second: Where I can find a parameter list for to implement the specific ideas of mine in PHP? Which programs makes allow to use editing features in the PHP language?

Thank you for your time!
xpek55
Posts: 13
Joined: Fri Sep 21, 2018 2:30 pm

Re: Request for feedback: Edit API with PHP for a specific purpose. (Details below)

Post by xpek55 »

I'm looked through my site's API and downloaded the PHP library from the cyclos.org. But still i have hardship with the editing. I don't have much experience with PHP... With video tutorials I can learn about easily, bit only with smaller experiments I intend to deal! I understand basically that web technologies how work, but I have a specific idea, which i find hard to translate into my community sites language yet!

We have created a "fixed" currency, also set up in mind its exchange rate... A full unit of the currency evaluted for 300 Ft's. But we don't exchange this currency for any reason to we receive Forints for the exchange or the currency it-self directly. Its just a support asset for a foundation and if you are a registered member in my community database, you can buy with the received "fixed" currency. You can use the complementary currency to sell and buy locally produced items cheaper in the "fixed" currency.

But if you use Forint's and you are a validated member in the community. In the seperated webshop we wish to address my community's membership that they can pay with their complementary currency, so it not enforces them, to paying with their hardly earned Forints! To boost and support the local economy and cause less burden!

Someone can help a bit, to provide a smaller instruction, where or how can I edit its properties in PHP of the API to reach this goal?

I"m not wait for others to do my parts of work! I'm a dedicated, hard working man as I think, but sometimes I also need some assistance in very exceptional cases!

Thank you for your time!
xpek55
Posts: 13
Joined: Fri Sep 21, 2018 2:30 pm

Re: Request for feedback: Edit API with PHP for a specific purpose. (Details below)

Post by xpek55 »

I looked through the documentation page of Cyclos 4, but I don't had any answers about my idea how to implement that effortlessly. In my opinion and experience I seeing the tools -> wizard section as a primary point. But I especially ask for assistance to attach a 3rd party webshop's (username+email address+actual complementary currency balance) validation scheme. How can I add such connection to my community site?

Please help in this matter, really I'm working a lot on other social programmes and I'm not a money grabbing person. I also living in poverty and want to help the planet and its inhabitants thrive! Believe me please, I am confessing here that I'm in the last 10 years I did a lot of efforts for my community, but the locals aren't recognized it, so i tried to detach myself from them and not let myself disturbed by the hardships. But I also have certain limits, which I can't surpass without help!

Please, if you can help! We will find a mutually beneficial thing to compensate. Anything a single tutorial, instruction-level related article is serves us well! We do what we can!

I'm also in desperate moments in my daily life. Please someone help! :(
jakob.schumann
Posts: 20
Joined: Thu Apr 23, 2020 5:37 pm

Re: Request for feedback: Edit API with PHP for a specific purpose. (Details below)

Post by jakob.schumann »

Hello Xpek,

you can take a look at https://github.com/bueffelsoft/cyclos-rest-api as an example of an API client in PHP. This is a quite complex construct, using the src/ApiWrapper.php as base class to send requests and receive the answers. The src/CyclosWrapper.php then uses this base class to make concrete calls to the API.

The project has no automated tests, the method signatures will probably change over time and it does not implement all or even the most endpoints, but it can give you an idea of how to to achieve what you need via PHP, you can fork / copy it and play around with it.

Best regards,
JS
Post Reply