appStore Context

Registry Context: Using storekey

ℹī¸ Coming soon

  1. Go to Meroku App Home https://app.meroku.org

  2. Go to your .appStore

  3. Go to "context" tab

  4. You will see a "storekey". This storekey will be used as a parameter in all search and listing calls to ensure that only .apps from your context are used.

Example: If your storekey is my-app-store then the following Search API is to be made.

curl --request GET \
  --url 'https://api.meroku.store/api/v1/dapp/search?search=nft&storeKey=my-app-store' \
  --header 'Accept: application/json' \
  --header 'apikey: YOUR_API_KEY'

Once you have them defined, you can retrieve them using the API call below.

For each featured section, you will see a "Section Key" in the UI. Once you have the section key, you can use that in the storekey param in the featured sections API calls.

API

SDK

Right now, there's no API to get a list of all featured sections for a .appstore. So you would need to note down the section keys from UI and use them in your .appstore UI at the places you want.

Categories

You can specify your own categories. That way, any .app listing from the Meroku .apps registry will be shown with your category and subcategory instead of Meroku's.

⚠ī¸ Coming Soon

Overriding default images

When we don't have any banner or screenshots of an app, we provide a default image. This default image is Meroku branded. Sometime you would want to override this with your own image. You can do this by checking if the default image URL is one of the following. If they are, then you can override it with your own image.

We serve the CDN urls on our APIs but the registry on chain has IPFS and CDN both. Hence we are sharing both the image urls.

Default Image URLs

IPFS

  1. Banner - https://bafybeie4nxjjsjsuxsvf7epxwa6i7fckbudrqgy6e6iomlhisehpnor4iq.ipfs.dweb.link/Banner.png

  2. Screenshot - https://bafybeie4nxjjsjsuxsvf7epxwa6i7fckbudrqgy6e6iomlhisehpnor4iq.ipfs.dweb.link/screenshots.png

  3. Logo - https://bafybeie4nxjjsjsuxsvf7epxwa6i7fckbudrqgy6e6iomlhisehpnor4iq.ipfs.dweb.link/icon.png

CDN

  1. Banner - https://dgshe1iny46ip.cloudfront.net/Banner.png

  2. Screenshot - https://dgshe1iny46ip.cloudfront.net/screenshots.png

  3. Logo - https://dgshe1iny46ip.cloudfront.net/icon.png

A following code will work

import axios from 'axios';

const options = {
  method: 'GET',
  url: 'https://api.meroku.store/api/v1/dapp/search/opensea.app',
  headers: {Accept: 'application/json', apikey: 'YOUR_API_KEY'}
};

// If you are fetching from contract, then use the IPFS URLs here
// instead of the CDN urls.
const DEFAULT_LOGO = "https://dgshe1iny46ip.cloudfront.net/icon.png";
const DEFAULT_BANNER = "https://dgshe1iny46ip.cloudfront.net/Banner.png"
const DEFAULT_SSHOT = "https://dgshe1iny46ip.cloudfront.net/screenshots.png";

try {
  const { data } = await axios.request(options);
  if (data.images) {
    if (data.images.logo === DEFAULT_LOGO) {
      /*
      add any custom logic to update the logo image here.
      */
    }
    
    if (data.images.banner === DEFAULT_BANNER) {
    /*
    add any custom logic to update the banner image here.
    */
    }
    
    if (data.images.screenshots && data.images.screenshots.length > 0 ) {
      for (img of data.images.screenshots) {
        if (img === DEFAULT_SSHOT) {
          /*
          add any custom logic to update the screenshot image here.
          */
        }
      }
    }
  }
} catch (error) {
  console.error(error);
}

Last updated