This service helps to forward thegraph queries to spaces which have limited scripting abilities other than links
You may deploy the forwarding service yourself or utilize the one provided by Zesty Market at https://forward.zesty.market
-
/space/:id/image/:format/:style?url=<url>&beacon=<beacon>
(GET)This endpoint allows you to get the current image for the space. The fields are as supported in the zesty sdk repository.
Parameters
:id
this field is a string that corresponds to your ad unit id on the Zesty Marketplace:format
this field can besquare
,wide
,tall
:style
this field can bestandard
,minimal
,transparent
?url
this field is the canonical URL of your experience (e.g.https://www.mygame.com
)&beacon
this is an optional argument to specify analytics behaviorIf
?beacon=1
onload metrics will be sent to the beacon server athttps://beacon.zesty.market
.By default, beacon is not enabled.
Examples
/space/1/square/standard?url=https://www.mygame.com&beacon=1
This refers to a Zesty ad unit with id=1. Displays a default image that's square and standard. Specifies it's hosted on
https://www.mygame.com
. Turns on the beacon to track onload data. -
/space/:id/cta?url=<url>beacon=<beacon>
(GET)This endpoint allows you to get the current CTA. The fields are as supported in the zesty sdk repository.
Parameters
:id
this field is a string that corresponds to your ad unit id on the Zesty Marketplace?url
this field is the canonical URL of your experience (e.g.https://www.mygame.com
)&beacon
this is an optional argument to specify analytics behaviorIf
?beacon=1
onload metrics will be sent to the beacon server athttps://beacon.zesty.market
.By default, beacon is not enabled.
Examples
/space/1/cta?url=https://www.mygame.com&beacon=1
This refers to a Zesty ad unit with id=1. Specifies it's hosted on
https://www.mygame.com
. Turns on the beacon to track onclick data.
-
Install necessary dependencies with yarn. The version of node which this was developed on is version
v16.7.0
yarn
-
Run index.js using
yarn start
-
You will need to have docker and docker-compose installed.
-
Setup the necessary ssl certificates.
.pem
is the certificate, while.key
refers to the private key// replace ./nginx/zesty.market.pem ./nginx/zesty.market.key
-
Create an
.env
file in the root of the repository. For now this is empty. -
Run docker-compose detached and build with the following command
docker-compose up -d --build
-
Stop the docker server
docker-compose stop
-
Shutdown the docker server and remove volumes and images
docker-compose down -v --rmi local