This repository has been archived on 2025-09-03. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
resolver/docs/layers/api.md
2017-07-18 12:47:41 +04:30

2.0 KiB

API

Is a decoupled layer of interfaces to data and/or functionality of one or more components.

CircleAPI.jsx

We provided some functions for doing some procedures on user circles.

getUserBelongCircles = (circles,followingId) => {}

To get circles which the user is added in. circles is the parameter that we want to know if user is exist in any of them or not. followingId is the parameter that show the use identifier who we are looking for in circles parameter.

getFollowingUsers = (circles) => {}

Get the user who are in circles. circles is the paramater that we get users from.

FileAPI.jsx

A set of functions for working with files.

getExtension = (fileName) => {}

Get file extension from file name. fileName is the name of file.

convertImageToCanvas = (image) => {}

Conver image to canvas. image is the image file should be converted.

constraintImage = (file,fileName, maxWidth, maxHeight) => {}

Resize an image with specific max-height and max-with. After resizing image, onSendResizedImage event will be fired and will send the image resized and file name as arguments . file is image file , fileName is the name of the image, maxWidth is the maximum width and maxHeight is the maximum width for the image.

dataURLToBlob = (dataURL) => {}

Convert data url file to blob file. dataURL is the file with data url type.

PostAPI.jsx

A set of functions for working with user posts.

detectTags = (content,character) => {}

Detect and get word wich starts with specific character in the content of a text.

getContentTags = (content) => {}

Get tag from the content of a text.

sortObjectsDate = (objects) => {}

Sort an java script object based on key/value type.