Add assets to a marker

S’abonner

As always, to authenticate a call Basic Authentication header should be set. See this TNO for details.

As soon as BEAR API is REST one (read here for details), to create an asset we have to use POST request to assets.

To create an assets you have to know ID of the marker this asset will be added to. See how to create a marker here. To get list of markers, you can call GET http://apidev.bear2b.com/markers?book_id=

There are few types of assets can be created in BEAR:

ID name type Description
1 file media 3D object
2 email button e-mail
3 url button URL button
4 phone button Phone button
5 video media Video
6 image media Image
7 webview media Web-view
9 audio media Audio
10 vcard button vCard
11 facebook button Facebook
12 twitter button Twitter
13 agenda button Agenda
14 file media File
       

Assets positioning is quite tricky and described in dedicated document here.

Code snippets:

We will work with marker #21187 of campaign #649

Create 3D object asset

Video(asset_type=5) and image(asset_type=6) created similarly. The only difference is another asset_type.

File-android used for 3D objects only.

Live example here


    
marker id:


    
asset_type:


    
file:


    
custom image:


    
x:


    
y:


    
width:


    
height:


    
Submit



Create Email asset

url (asset_type=3), phone(asset_type=4) and text(asset_type=8) created similarly. The only difference is another asset_type

Live example here


    
marker id:


    
asset_type:


    
email:


    
custom image:


    
x:


    
y:


    
width:


    
height:


    
Submit



Cet article vous a-t-il été utile ?
Utilisateurs qui ont trouvé cela utile : 0 sur 0

Commentaires

0 commentaire

Vous devez vous connecter pour laisser un commentaire.