karlomikus / bar-assistant

Bar assistant is a all-in-one solution for managing your home bar

Home Page:https://barassistant.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Are there examples for the import formats?

shimizurei opened this issue · comments

While testing the demo, I noticed that there was an import section. I looked at the docs, but there wasn't a section on how to import using the JSON, YAML, or the Collection formats? How is it supposed to look?

Hello, currently you can check out the schema format in the openapi spec: https://bar.karlomikus.com/bar/docs?cachebust=1#/Cocktails/shareCocktail

Also you can click on a share button when viewing cocktail and there will be "Copy as JSON" option. For example:

{
    "name": "Japanese cocktail",
    "instructions": "1. Combine all ingredients in a mixing glass with ice and stir\n2. Strain into a coupe, serve up",
    "garnish": "Lemon peel",
    "description": "The Japanese cocktail is notorious for a handful of things: it's a very old cocktail, published in Jerry Thomas’s landmark 1862 book How to Mix Drinks; it was the first mixed drink to be named something other than “Whiskey Cocktail”, “Brandy Cocktail”, or some other similarly obvious epithet; it might be the only cocktail Thomas invented himself; and finally, it was the first cocktail to feature more than a dash of a fancy sweetener, orgeat.",
    "source": null,
    "tags": [
        "Brandy"
    ],
    "glass": "Coupe",
    "method": "Stir",
    "images": [
        {
            "url": "https:\/\/bar.karlomikus.com\/bar\/uploads\/cocktails\/japanese-cocktail.jpg",
            "copyright": "The Drink Blog",
            "sort": 1
        }
    ],
    "ingredients": [
        {
            "sort": 1,
            "name": "Brandy",
            "amount": 60,
            "units": "ml",
            "optional": false,
            "category": "Spirits",
            "description": "Liquor produced by distilling wine.",
            "strength": 40,
            "origin": "Worldwide",
            "substitutes": []
        },
        {
            "sort": 2,
            "name": "Orgeat Syrup",
            "amount": 15,
            "units": "ml",
            "optional": false,
            "category": "Syrups",
            "description": "Sweet syrup made from almonds, sugar, and rose water or orange flower water.",
            "strength": 0,
            "origin": null,
            "substitutes": []
        },
        {
            "sort": 3,
            "name": "Angostura aromatic bitters",
            "amount": 2,
            "units": "dashes",
            "optional": false,
            "category": "Bitters",
            "description": "Angostura bitters is a concentrated bitters (herbal alcoholic preparation) based on gentian, herbs, and spices, by House of Angostura in Trinidad and Tobago.",
            "strength": 44.7,
            "origin": "Trinidad & Tobago",
            "substitutes": []
        }
    ]
}

For collections it's the same, you can copy the JSON when on collections page, and when you click the share button.

Oh nice! Thank you so much for all your hard work!!!