Skip to content
/ dgkala Public

A simple Go package to interact with Digikala website

License

Notifications You must be signed in to change notification settings

mamal72/dgkala

Repository files navigation

Build Status Go Report Card Coverage Status GoDoc license

dgkala

This is a simple Go package to interact with Digikala website.

Installation

go get github.com/mamal72/dgkala

Usage

package main

import (
    "fmt"

    "github.com/mamal72/dgkala"
)

func main() {
    // Get incredible offers
    offers, err := dgkala.IncredibleOffers() // []IncredibleOffer, error
    fmt.Printf("%+v\n", offers)

    // Search for a product by a string keyword
    searchResult, err := dgkala.Search("case-logic-dlbp") // SearchResult, error
    fmt.Printf("%+v\n", searchResult)

    // Get details of a product by ID
    productByID, err := dgkala.GetProductByID(6071) // ProductByID, error
    fmt.Printf("%+v\n", productByID)
}

Tests

go test

Ideas || Issues

Just fill an issue and describe it. I'll check it ASAP!

Contribution

You can fork the repository, improve or fix some part of it and then send the pull requests back if you want to see them here. I really appreciate that. ❤️

Remember to write a few tests for your code before sending pull requests.

License

Licensed under the MIT License.

About

A simple Go package to interact with Digikala website

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages