Topics

Tribe Support

Tribe Support's Topics

Akgora Flip

Akgora Flip

April 14 2020

Anahitha API documentation

Hi,

I would like to use API of Anahita can you provide a detailed document on this or walk me through how can we start using it for mobile app development. Do it require to stick to a specific framework, could help me out on this.

#Anahita #Documentation #Roadmap #Vision #Resources

Rastin Mehr
Rastin Mehr
April 24 2020 Permalink
I just committed fresh code. Do a pull and try again. It should work now.
Akgora Flip
Akgora Flip
April 24 2020 Permalink
Thanks
Akgora Flip
Akgora Flip
April 24 2020 Permalink
Hi Rastin, successfully installed React app, i Need to change the file name person.js to Person.js ( not capital P ) in src/prototypes folder.

I will Play around with react app. Thanks for your time
Rajkumar Mundel liked this
Rastin Mehr
Rastin Mehr
April 24 2020 Permalink
That's funny, it shows Person.js on my machine, but person.js on Github. Good catch, thank you. I'll look into it.
2 people liked this
Rastin Mehr
Rastin Mehr
April 24 2020 Permalink
Alright, that is fixed too.
Akgora Flip
Akgora Flip
April 24 2020 Permalink
Thanks :-) working on Enabling the CORS to sync anahita with anahitha -React
Rastin Mehr liked this
Rastin Mehr
Rastin Mehr
April 24 2020 Permalink
Good, let me know if you had any more questions 🙂
Akgora Flip
Akgora Flip
April 24 2020 Permalink
perfect implemented the CORS in the .htaccess file on my server

Header set Access-Control-Allow-Origin "http://192.168.56.1:3000" # react app ip
Header set Access-Control-Allow-Methods "GET,PUT,POST,DELETE"
Header set Access-Control-Allow-Headers "Content-Type, Authorization"
Header set Access-Control-Allow-Credentials true

Works well but one thing is i had to change this
return axios.post('people/session.json', constructURLSearchParams(credentials));
To
return axios.post('http://localhost/myProject/www/index.php/people/session.json', constructURLSearchParams(credentials));

Is there any config available where i can add the Base URL of anahita backend
Thanks in advacne
Rastin Mehr
Rastin Mehr
April 24 2020 Permalink
Cool! You mean this? https://github.com/anahitasocial/anahita-react/blob/master/.env.sample

Create a .env file and restart the react app
Akgora Flip
Akgora Flip
April 24 2020 Permalink
Thank you soo much .
i also fixed one of the issue with avatar src
from viewer.imageURL.medium.url to viewer.imageURL && viewer.imageURL.medium ? viewer.imageURL.medium.url:

as we get undefined when no avatar is set , a fall back image is required i think.
Akgora Flip
Akgora Flip
April 24 2020 Permalink
>Avatar
alt={`${viewer.givenName.charAt(0)}${viewer.familyName.charAt(0)}`}
src={viewer.imageURL && viewer.imageURL.medium ? viewer.imageURL.medium.url:''}
className={classes.avatar}
/<
Rastin Mehr
Rastin Mehr
April 24 2020 Permalink
In the react app we don't want background image. It is supposed to show the initials. Also, let's keep support related topics focused on one issue from now on. For Anahita project development and code-related discussions, let's use the Anahita Project group

https://www.getanahita.com/groups/42242-anahita-project

This way we can keep support related topics from Anahita project topics.
@Atest would you like to share Step by step process to setup Anahita React and Anahita as Backend with us ?
2 people liked this
Hi Rastin,
Hope your doing great.
Actually i am working on developing a mobile app with the backend.
and the scenario here is that i need to include the mobile number for signup and sign in process.
could you please guide me where do i need to take care of the new mobile number field after adding it to the db.
This would be of a great help.
Thanks In Advance
@atest start a new topic please, so we can look into it.

Powered by Anahita