Get all available locales with @prismicio/client - v6

Hi, I saw on other posts that it is possible to query the available locales by using the previous JS library like below.
How can I do the same thing using the new library?

Prismic.api("https://your-repository-name.cdn.prismic.io/api/v2").then(function(api) {
  languages = api.data.languages
});

Thanks!

Nevermind.
Just figured it out :laughing:

I just need to call getRepository method from the client.
Just in case anyone wondering how it done:

const client = createClient(endpoint, options);
const api = await client.getRepository();

Moderators feel free to close this.
Thanks!

Hello @yver

Thanks for reaching out to us.

I am glad that you have figured it out. Let us know if you need any help.

Priyanka