Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pages API #1986

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open

pages API #1986

wants to merge 1 commit into from

Conversation

GunkaArtur
Copy link
Contributor

@GunkaArtur GunkaArtur self-assigned this Feb 28, 2024
@GunkaArtur GunkaArtur force-pushed the 25687-pagesAPI branch 7 times, most recently from 30eb203 to d993631 Compare March 12, 2024 13:25
brizy.php Outdated
@@ -17,7 +17,7 @@
$_SERVER['HTTPS'] = 'on';
}

define('BRIZY_DEVELOPMENT', false );
define('BRIZY_DEVELOPMENT', true );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rollback

Comment on lines 103 to 112
// pagesUrl: pipe(
// mPipe(Obj.readKey("pagesUrl"), Str.read),
// throwOnNullish("Invalid API Config: stories")
// )
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uncomments

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will be in separate issue

Comment on lines 305 to 303
const imageUrl = "https://cloud-1de12d.b-cdn.net/media/iW=1024&iH=1024/";
const apiPagesUrl = "https://j6dfq8pl41.b-cdn.net/api";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move to config

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will be in separate issue

Comment on lines 311 to 309
const meta = await fetchAllLayouts<PagesAPI>(
`${apiPagesUrl}/get-pages`,
50
);

res({
blocks: convertPages(meta, imageUrl),
categories: getUniqueLayoutsCategories(meta)
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

create the fn inside api folder same as savedLayouts

): Promise<T[]> => {
let allElements: T[] = [];

const firstPageResponse = await fetch(`${url}?per_page=${itemsPerPage}`).then(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the urls need to be create with makeUrl fn

@GunkaArtur GunkaArtur force-pushed the 25687-pagesAPI branch 3 times, most recently from 2e43940 to cf0edb5 Compare March 28, 2024 11:39
@GunkaArtur GunkaArtur force-pushed the 25687-pagesAPI branch 3 times, most recently from 49ee2d5 to 99b1b7e Compare April 26, 2024 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants