Fetch Latest Version of App โ Smart Update Links
Ever needed to share a download link that always points to the latest version of your app? Or wanted to set up automatic updates for your users? The Fetch latest version of app
endpoint is your perfect solution! Let's explore how it works with some real-world examples.
Meet Our Example App ๐ฎโ
Let's imagine we have an app called "SpaceExplorer" with the following setup:
Channels:โ
- ๐
stable
- Production releases - ๐งช
beta
- Testing versions - ๐
nightly
- Daily builds
Platforms & Architectures:โ
- ๐ป Linux (amd64, arm64)
- ๐ macOS (amd64, arm64)
- ๐ช Windows (amd64)
Package Types:โ
- ๐ฆ .deb (Linux)
- ๐ฆ .rpm (Linux)
- ๐ฆ .dmg (macOS)
- ๐ฆ .exe (Windows)
Let's Fetch Some Versions! ๐ฏโ
Example 1: Simple Latest Versionโ
GET /apps/latest?app_name=SpaceExplorer&owner=admin
This basic request returns ALL available builds:
{
"stable": {
"linux": {
"amd64": {
"deb": { "url": "..." },
"rpm": { "url": "..." }
},
"arm64": {
"deb": { "url": "..." },
"rpm": { "url": "..." }
}
},
"darwin": {
"amd64": { "dmg": { "url": "..." } },
"arm64": { "dmg": { "url": "..." } }
},
"windows": {
"amd64": { "exe": { "url": "..." } }
}
},
"beta": {
// Similar structure for beta builds
},
"nightly": {
// Similar structure for nightly builds
}
}
Example 2: Specific Channelโ
GET /apps/latest?app_name=SpaceExplorer&channel=stable&owner=admin
Now we get only stable builds:
{
"stable": {
"linux": {
"amd64": {
"deb": { "url": "..." },
"rpm": { "url": "..." }
}
// ... other architectures
}
// ... other platforms
}
}
Example 3: Platform-Specificโ
GET /apps/latest?app_name=SpaceExplorer&channel=stable&platform=linux&owner=admin
Only Linux builds:
{
"stable": {
"linux": {
"amd64": {
"deb": { "url": "..." },
"rpm": { "url": "..." }
},
"arm64": {
"deb": { "url": "..." },
"rpm": { "url": "..." }
}
}
}
}
Example 4: Exact Matchโ
GET /apps/latest?app_name=SpaceExplorer&channel=stable&platform=linux&arch=amd64&package=deb&owner=admin
This returns a direct download URL:
https://<bucket_name>.s3.amazonaws.com/SpaceExplorer/stable/linux/amd64/SpaceExplorer-1.2.3.deb
Smart Features ๐ง โ
-
Automatic Redirection ๐
- If only one build matches your criteria, you'll get redirected straight to the download
- Perfect for landing pages and direct download links
-
Flexible Responses ๐ฏ
- Get all available builds
- Filter by channel
- Filter by platform
- Filter by architecture
- Filter by package type
Real-World Use Cases ๐โ
1. Landing Page Downloadsโ
<!-- For Linux users -->
<a href="/apps/latest?app_name=SpaceExplorer&platform=linux&arch=amd64&package=deb&owner=admin">
Download for Linux (.deb)
</a>
<!-- For macOS users -->
<a href="/apps/latest?app_name=SpaceExplorer&platform=darwin&arch=arm64&package=dmg&owner=admin">
Download for macOS (.dmg)
</a>
2. Team Testingโ
# For beta testers
GET /apps/latest?app_name=SpaceExplorer&channel=beta&platform=darwin&arch=arm64&package=dmg&owner=admin
# For nightly build enthusiasts
GET /apps/latest?app_name=SpaceExplorer&channel=nightly&platform=linux&arch=amd64&package=deb&owner=admin
What's Next? ๐โ
In our next posts, we'll explore:
- Performance optimization tips
Stay tuned for more faynoSync tips and tricks! ๐
How to try faynoSync?โ
-
Follow the Getting Started guide:
๐ https://ku9nov.github.io/faynoSync-site/docs/category/getting-started -
Create your app using the REST API or web dashboard:
๐ฆ API Docs: https://ku9nov.github.io/faynoSync-site/docs/api
๐ฅ๏ธ Dashboard UI: https://github.com/ku9nov/faynoSync-dashboard -
Upload at least two versions of your application.
-
Check for updates with this simple request:
๐ก/info/latest
If you find this project helpful, please consider subscribing, leaving a comment, or giving it a star, create Issue or feature request on GitHub.
Your support keeps the project alive and growing ๐