• Stars
    star
    9
  • Rank 1,876,060 (Top 39 %)
  • Language
    Go
  • License
    GNU General Publi...
  • Created over 7 years ago
  • Updated almost 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Simple script for farm free books from PackPub.com

Bookgot

BookGot is a simple boot for farm free books from PACKTPUB.COM

#Install

go get -u github.com/bregydoc/Bookgot

Usage

First import BookGot

//...
import "github.com/bregydoc/Bookgot"

Second create a User for Login in PackPub

user := Bookgot.CreateNewPBUser("[email protected]", "password")
ok := user.Login()
if ok && user.Logged{
	fmt.Println("User logged!")
}

For verify if the user have the last free book from PacktPub.com

//...
if ok := user.VerifyIfIHaveLastFreeBook(); ok{
	fmt.Println("You are up to day")
}

If VerifyIfIHaveLastFreeBook() return false is because PackPub have a new free book and you not claim this. You can know the name of the current free book

//...
if ok := user.PullNewFreeBook(); ok{
	fmt.Println("Ok, you have the last free book")
}

If you want to know the list of books in your account, you can use the GetNamesOfBooks() function

//...
user := Bookgot.CreateNewPBUser("[email protected]","password")
books := user.GetNamesOfBooks()
for i, book := range books{
	fmt.Println("Book ", i , " : ", book)
}

Other functions

Return the name of last free book in PackPub.com

//...
name := Bookgot.GetNameOfCurrentFreeBook()
fmt.Println(name)

Return the time left for update the free book

//...
timeLeft, _ := Bookgot.GetTimeForNewFreeBook()
fmt.Println(timeLeft.String())

#Example for create a complete bot

package main

import(
	"github.com/bregydoc/Bookgot"
	"fmt"
)

func main() {
	userExample := Bookgot.CreateNewPBUser("[email protected]", "password")
	if userExample.Login() {
		fmt.Println("Logged!")
	}
	for {
		haveNewBook := userExample.VerifyIfIHaveLastFreeBook()

		if haveNewBook{
			haveNewBook = userExample.VerifyIfIHaveLastFreeBook()
			timeAfter, _ := Bookgot.GetTimeForNewFreeBook()
			fmt.Println("Not new free book, time for next book: ", timeAfter.String())
		}else {
			petition :=  userExample.PullNewFreeBook()
			if petition{
				fmt.Println("New free book added at your library")
			}else{
				fmt.Println("Error, verify your email and password")
			}
		}
		
	}

}

More Repositories

1

pigment

A simple but useful package to play with colors in flutter
Dart
215
star
2

gtranslate

Google translate API for unlimited and free translations, gtranslate generates the necessary token to use the Google Translate API for free
Go
189
star
3

blackholeDB

BlackholeDB is a simple distributed key-value DB based on IPFS protocol.
Go
125
star
4

bcidatasetIV2a

This is a repository for BCI Competition 2008 dataset IV 2a fixed and optimized for python and numpy. This dataset is related with motor imagery
Python
101
star
5

eeg_motor_imagery_gan

This repository save my work about GAN applied to motor imagery eeg signals
Jupyter Notebook
37
star
6

PGoJs

Processing sketchs with Go, using p5Js as core
Go
33
star
7

freeproxy

Proxy a la carte, set with different proxies your project
Go
13
star
8

culqi-hook

A small hook to integrate Culqi with the most recent react's feature: hooks.
JavaScript
7
star
9

newtabdribbble

Source code of New Tab Dribbble extension
JavaScript
5
star
10

gaea

Life for your user data
Go
5
star
11

freya

Micro service for mailing and SMS with gRPC as communication protocol
Go
4
star
12

torioux-hands

Deep learning application example to apply to Torioux Group
Jupyter Notebook
3
star
13

rengo

Get public Peruvian people data from Reniec, bypass written in Go, based on "peruanosenlinea.com"
Go
3
star
14

homebrew-tilibs

Hoembrew tap with libraries for connecting to Texas Instruments calculators (Fixed some formulae errors)
Ruby
2
star
15

detechApp

App for detech (Ulcers detector using machine learning)
Dart
2
star
16

simple-react-example

Simple react example using styled-components
JavaScript
2
star
17

Vowel_classification

A simple project for Signal Processing course at UTEC University
Jupyter Notebook
2
star
18

opendribbble

A simple scrapper for get popular shots of dribbble website
Go
2
star
19

AutoCalendarUTEC

HTML
2
star
20

whoiam

My personal presentation
Elm
2
star
21

ergo

I have an error "ergo" I handle it
Go
2
star
22

endemica

Endémica is a Peruvian project to show our endemic plant species to be used by researchers and any person interested in our biodiversity.
Dart
2
star
23

PotatoesOnMarsControl

v2.0
Java
1
star
24

labo

Labo is a CLI tool to perform a research environment
Go
1
star
25

whoiam-pitch

Elevator Pitch about Bregy
JavaScript
1
star
26

lsd

LSD is a simple notification broker delivery
Go
1
star
27

timy

Timy is a tool to record different events and process this insights with machine learning algorithms
Go
1
star
28

graffity

1
star
29

shh-js

JS client to encode message to SHH server
JavaScript
1
star
30

bregyme

My own site for all my work
JavaScript
1
star
31

Echoes

MMOCM
JavaScript
1
star
32

sunat-crawler

Crawler Puppeteer based for get names from dni information, this tool only works into Peru
JavaScript
1
star
33

MarsWeatherSimulator

Java
1
star
34

neuro

Research about Brain Computer Interfaces
JavaScript
1
star
35

baaas

Python
1
star
36

micro-culqi

Micro-culqi is a micro service related to culqi charges and culqi subscriptions
Go
1
star
37

shh

a simple shh for your browser-server trades
Go
1
star
38

prisgo

Prisma Binding with Go! Prima + GQLGen = Full GraphQL Go Server
Go
1
star
39

HUMO

Unofficial API for UTEC EDU system (It works so slow as the original)
Jupyter Notebook
1
star
40

ceres

REST generator with Go, Boltdb and Iris-go
Go
1
star
41

holmes

Holmes is a set of tools to scrapping public information about Peruvian government workers and politicians
Python
1
star
42

Detech_web

This is the second intent creating detech web
HTML
1
star
43

dmt

DMT is a minimalistic multi channel delivery system with a very easy way to execute a task.
Go
1
star