This section clarify some API that use from the product, this is base on the Dokan API and some extra customize Wordpress site
Common File
File locate: src/Common**
- Config.js: main config variables for the app
- Colors.js: config theme color for the app
- Constants.js: Config wordpress URL, icons, categories...
- Images.js: list of all images use for the app
- Languages.js: main language file config
- Layout.js: Use to config the main flexible homepage.
- Tools.js: Common functions
Components
- Files locate in: src/Components
- Common components that could be used many time, this could be a custom button, comment component, icon input...
Containers
- Files locate in: src/Containers
- most components of the app is putting here, you could change or re-structure by matching with your own project design.
Expo
- Files locate in: src/Expo
- Wrapper Expo function
Services
- Files locate in : src/Services
- The Wodpress Api for the app you can refer to the Wordpress API -http://v2.wp-api.org/and custom your own function if you want to add more feature for the app.
Navigation
- App/Containers
most container/pages of the app is putting here, you could change or re-structure by matching with your own project design. - App/Navigation:
Wrapper function for react-nativigation and main screens of navigation - Wrapper function for react-nativigation v2.0
Redux
- Files locate: App/Redux
- Contain main action and reducers
Debug app with Reacttotron
Link download on desktop: http://bit.ly/2L0R9gY
It's already configed with the project, after installed the Reacttotron you can see list of Log, Image, connection, API, Redux actions....
You can able to the config the app to work with Reactotron or React Native Debugger by change useReactotron:false (file common/Constants.js)
Common API
-
GET - Get Products ( https://your-hosting.com/wp-json/wc/v2/products)
- This endpoint allows you to get list of products, detail from - http://bit.ly/2L3vvJi
- page (number): Current page of the collection. Default is 1.
- per_page(number): Maximum number of items to be returned in result set. Default is
10
.
-
GET - Get Product Categories ( https://your-hosting.com/wp-json/wc/v2/categories)**
- This help to list all the categories
- page (number): Current page of the collection, default is 1.
- per_page(number): Maximum number of items to be returned in result set. Default is 10.
-
GET - List all payment gateways ( https://your-hosting.com/wp-json/wc/v2/payments_gateways)**
- This API helps you to view all the payment gateways
- page (number): Current page of the collection, default is 1.
- per_page(number): Maximum number of items to be returned in result set. Default is 10.