PHP Curl ile letgo api kütüphanesi oluşturuldu. php ile letgo giriş yap.

Overview

Kendi LETGO API ile işlemler gerçekleştirelim.

// email işlemleri 
$server = 'imap.gmail.com';
$user = '[email protected]';
$pass = 'password';
$port = 993; // 

Configürasyon ayarlarımızı yapalım.

$emailConfig = new EmailReaderConfig(
	    $server,$user,$pass,$port
);

Mail Okuyucumuzu İnitialize edelim

$emailReader = new EmailReader($emailConfig);

// letgo hesabında oturum işlemlerini başlatabilmemiz için mail adresimize gönderilen özel bağlantıya erişebilmemiz gerekir.

$letgoConfig = [
"devMode" => true, // then show process messages
"waitSecond" => 2, // Search mail every {prop} second default value 2
"maxSearchCount" => 15, // search mail every {prop} second and limit {prop}
"target_host" => "acct.letgomail.com", // search the adress
"cookieFolder" => __DIR__."\cookie\\" // cookie bilgisinin kaydedileceği klasör bilgisini içerir.
];

Letgo API işlemleri

$letgo = new Letgo($emailReader,$letgoConfig);

ya da

$letgo = new Letgo($emailReader);

$letgo->config($letgoConfig);

init edebiliriz.

Proxy kullanarak giriş yapmak

$proxy = "<proxy adress>";
$proxyAuth = "<proxy auth>";

$status = $letgo->login($proxy,$proxyAuth);

Ya da kendi ip adresimiz ile

giriş bilgisine login metodundan geri dönen booleean değer ile yada isLogin ile karşılaştırma yapılır.

$status = $letgo->login();

** Dİğer işlemlerden sonra deauth olabileceğinden

$letgo->isLogin();

ile kontrol sağlamak faydalı olacaktır.

Kullanıcı Bilgilerimize erişmek

// ile giriş bilgilerini obje olarak döndürür.
$auth = $letgo->auth();

Bildirimlerimze erişmek

// bildirim objesi döndürür.

$letgo->notifications();

Satılan ürünleri göster

$letgo->product_sold($auth->data->id); // user_id props

Aktif listedeki ürünleri göster

$letgo->product_selling($auth->data->id); // user_id props

Eklediğim favorileri göster

$letgo->favorites($auth->data->id); // user_id props

Bir ürünü favorilere ekle

$letgo->add_favorite($auth->data->id,$product_id); // @return boolean

Bir ürünü favorilerden kaldır`

$letgo->remove_favorite($auth->data->id,$product_id); // @return boolean

Bir ürünü report et

$letgo->report_product($auth->data->id,$product_id); // @return boolean

istatisik bilgilerini döndür

// görüntüleme sayısı, favori sayısı ..

$link_adres = "https://www.letgo.com/tr-tr/i/8e9a02c0-7bfb-4142-91e3-a0029adb422b";
$letgo->stats($link_adres);

Profil bilgilerini güncelle

if($letgo->isLogin()){
    // Bilgilerimi güncelle
    $letgo->profile_update($letgo->auth()->data->id,[
	    "public_username" => "Adı soyadı"
	    //"email" => "",
	    // "city" => "",
	    //"adress" => ""
    ]);

}else{
    echo 'giriş yapılamadı';
}

Bir kullanıcıyı engelle

$block_user_id = "832dc416-efdc-44ba-8e97-957c8a03";

$letgo->user_block($letgo->auth()->data->id,$block_user_id);

Bir kullanıcıyı engelini kaldır

$block_user_id = "832dc416-efdc-44ba-8e97-957c8a03"
$letgo->user_unblock($letgo->auth()->data->id,$block_user_id);
You might also like...
Online tool to convert `curl` requests to Laravel `Http` requests

curl Converter Another bit of automation from Shift to convert curl requests to Laravel Http requests. This project is a WIP. You may follow along wit

Free Cricket API - Live Cricket Score JSON API 🏏
Free Cricket API - Live Cricket Score JSON API 🏏

Free Cricket API 🍔 Live Cricket Score API 🏏 unofficial API Data Fetched from Cricbuzz.com This is an unofficial API and not Linked or Partnered with

 A PHP HttpClient for the Neo4j ReST API with MultiDB Support
A PHP HttpClient for the Neo4j ReST API with MultiDB Support

NeoClient This repository has moved Neoxygen's NeoClient has been moved to https://github.com/graphaware/neo4j-php-client Version 3 of this library is

KTMB (Keretapi Tanah Melayu Berhad) Station Schedule Checker in PHP via MyRailTime 2.0's API
KTMB (Keretapi Tanah Melayu Berhad) Station Schedule Checker in PHP via MyRailTime 2.0's API

KTM Station Schedule Checker & Journey Planner in Web Form (PHP) KTMB (Keretapi Tanah Melayu Berhad) Station Schedule Checker & Journey Planner in Web

Transform your WordPress site into a modern GraphQL server: graphql-api.com.
Transform your WordPress site into a modern GraphQL server: graphql-api.com.

GraphQL API for WordPress Transform your WordPress site into a modern GraphQL server: graphql-api.com. This plugin is the implementation for WordPress

A YOURLS plugin allowing the shortening of multiple URLs with one API request.

Bulk URL Shortening - a YOURLS plugin Plugin for YOURLS Plugin URI: github.com/tdakanalis/bulk_api_bulkshortener Description: A YOURLS plugin allowing

Creating an all in one AI with a web UI to control it. Create your own AI server and/or sell API keys to other people to use your AI.
Creating an all in one AI with a web UI to control it. Create your own AI server and/or sell API keys to other people to use your AI.

+ Currently taking an hour or two break to spend some time with the wife. - Then going to work on auto refreshing the chat and document ingestion so y

Retrofit implementation in PHP. A REST client for PHP.

Retrofit PHP Retrofit is a type-safe REST client. It is blatantly stolen from square/retrofit and implemented in PHP. ❗ UPGRADE NOTICE ❗ Version 3 int

HTTP header kit for PHP 7.1+ (incl. PHP 8) based on PSR-7

HTTP header kit for PHP 7.1+ (incl. PHP 8) based on PSR-7 Installation composer require sunrise/http-header-kit How to use? HTTP Header Collection Mor

Owner
Görkem Bayraktar
Görkem Bayraktar
PHP cURL for feed Instagram Graph API

php-curl-instagram-graph PHP cURL for feed Instagram Graph API Script made based on the new (2020) Instagram API that requires authorization token gen

null 12 Apr 13, 2022
A Chainable, REST Friendly, PHP HTTP Client. A sane alternative to cURL.

Httpful Httpful is a simple Http Client library for PHP 7.2+. There is an emphasis of readability, simplicity, and flexibility – basically provide the

Nate Good 1.7k Dec 21, 2022
PHP Curl Class makes it easy to send HTTP requests and integrate with web APIs

PHP Curl Class: HTTP requests made easy PHP Curl Class makes it easy to send HTTP requests and integrate with web APIs. Installation Requirements Quic

null 3.1k Jan 5, 2023
The best php curl library.

中文文档 About Implemented by using php-curl internal io event with high performance,high universality,high extensibility which especially suitable for ma

Ares 431 Dec 12, 2022
Custom PHP curl library for the Laravel 5 framework - developed by Ixudra

ixudra/curl Custom PHP cURL library for the Laravel 4 or 5 framework - developed by Ixudra. The package provides an easy interface for sending cURL re

Jan Oris 556 Jan 6, 2023
Simple PHP curl wrapper class

php-curl The smallest possible OOP wrapper for PHP's curl capabilities. Note that this is not meant as a high-level abstraction. You should still know

Andreas Lutro 243 Dec 5, 2022
This library provides an object-oriented wrapper of the PHP cURL extension

PHP Curl Class This library provides an object-oriented wrapper of the PHP cURL extension. If you have questions or problems with installation or usag

PHP MOD 321 Dec 30, 2022
The best php curl library.

中文文档 About Implemented by using php-curl internal io event with high performance,high universality,high extensibility which especially suitable for ma

Ares 431 Dec 12, 2022
Simple HTTP cURL client for PHP 7.1+ based on PSR-18

Simple HTTP cURL client for PHP 7.1+ based on PSR-18 Installation composer require sunrise/http-client-curl QuickStart composer require sunrise/http-f

Sunrise // PHP 15 Sep 5, 2022
Plug & Play [CURL + Composer Optional], Proxy as a Service, Multi-tenant, Multi-Threaded, with Cache & Article Spinner

?? .yxorP The SAAS(y), Multitenancy & Augmenting Web Proxy Guzzler is a 100% SAAS(y) plug-and-play (PHP CURL+Composer are Optional) solution that leverages SAAS architecture to provide multi-tenancy, multiple threads, caching, and an article spinner service.

4D/ҵ.com Dashboards 12 Nov 17, 2022