# Achievements

**Support**

Use this to determine if you can implement achievements for your game on the current platform.

```lua
bridge.achievements.is_supported()
```

Check if getting list of achievements is supported.

```lua
bridge.achievements.is_get_list_supported()
```

Check if built-in popup is supported.

```lua
bridge.achievements.is_native_popup_supported()
```

**Unlock achievement**

Unlocks achievement for a player.

```lua
local bridge = require("bridge.bridge")

function init(self)
    local options = {
        y8 = {
            achievement = "ACHIEVEMENT_NAME",
            achievementkey = "ACHIEVEMENT_KEY"
        },
        lagged = {
            achievement = "ACHIEVEMENT_ID"
        }
    }

    bridge.achievements.unlock(options, function ()
        -- success
    end, function ()
        -- error
    end)
end
```

**Get List**

Returns the achievements list

```lua
local bridge = require("bridge.bridge")

function init(self)
    local options = { }
    bridge.achievements.get_list(options, function (_, data)
        -- success
    end, function ()
        -- error
    end)
end
```

**Show Native Popup**

Some platforms support built-in achievement list which is shown in overlay

```lua
local bridge = require("bridge.bridge")

function init(self)
    local options = { }
    bridge.achievements.show_native_popup(options, function ()
        -- success
    end, function ()
        -- error
    end)
end
```
