Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mamal72/dgkala
A simple Go package to interact with Digikala website
https://github.com/mamal72/dgkala
api scraper shopping
Last synced: 21 days ago
JSON representation
A simple Go package to interact with Digikala website
- Host: GitHub
- URL: https://github.com/mamal72/dgkala
- Owner: mamal72
- License: mit
- Created: 2017-01-13T21:50:05.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-25T12:05:29.000Z (over 7 years ago)
- Last Synced: 2024-06-21T06:17:25.996Z (5 months ago)
- Topics: api, scraper, shopping
- Language: Go
- Size: 65.4 KB
- Stars: 15
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Build Status](https://travis-ci.org/mamal72/dgkala.svg?branch=master)](https://travis-ci.org/mamal72/dgkala)
[![Go Report Card](https://goreportcard.com/badge/github.com/mamal72/dgkala)](https://goreportcard.com/report/github.com/mamal72/dgkala)
[![Coverage Status](https://coveralls.io/repos/github/mamal72/dgkala/badge.svg?branch=master)](https://coveralls.io/github/mamal72/dgkala?branch=master)
[![GoDoc](https://godoc.org/github.com/mamal72/dgkala?status.svg)](https://godoc.org/github.com/mamal72/dgkala)
[![license](https://img.shields.io/github/license/mamal72/dgkala.svg)](https://github.com/mamal72/dgkala/blob/master/LICENSE)# dgkala
This is a simple Go package to interact with [Digikala](https://www.digikala.com) website.
## Installation
```bash
go get github.com/mamal72/dgkala
```## Usage
```go
package mainimport (
"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
```bash
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. :heart:
Remember to write a few tests for your code before sending pull requests.
## License
Licensed under the [MIT License](https://github.com/mamal72/dgkala/blob/master/LICENSE).