Python ile grup irtibatlarını al
Python ile bir grubun kişilerini alın
Python : API BELGELERİ
- Python ile grup oluştur
- Python ile grup alanı listesini al
- Python ile bir gruba alan ekleyin
- Python ile bir gruptan alan silme
- Gruptaki bir kişiyi silme
- Ülkeyi Python ile e grubuna atama
- Python ile grup irtibat listesini al
- Python ile bir gruba kişi ekleyin
- Bir grubun kişisini Python ile değiştirin
- Python ile bir grubun kişisini sil
- {Language} ile aktif sohbet kanallarının bir listesini alın
- {Language} ile sohbet yoluyla mesaj gönderin
- {Language} ile sohbet yoluyla bir dosya gönderin
- {Language} ile bir sohbette konuşmaların listesini alın
- {Language} ile bir sohbetten mesajların listesini alın
- {Language} ile bir sohbetten okunmamış mesajların bir listesini alın
Python ile grup irtibatlarını al
import urllib2
afilnet_class="group"
afilnet_method="getcontacts"
afilnet_user="user"
afilnet_password="password"
afilnet_idgroup="1000"
# Create an URL request
sUrl = "https://www.afilnet.com/api/http/?class="+afilnet_class+"&method="+afilnet_method+"&user="+afilnet_user+"&password="+afilnet_password+"&idgroup="+afilnet_idgroup
result = urllib2.urlopen(sUrl).read()
from urllib.request import urlopen
from urllib.parse import urlencode
afilnet_class="group"
afilnet_method="getcontacts"
afilnet_user="user"
afilnet_password="password"
afilnet_idgroup="1000"
# Create an URL request
sUrl = "https://www.afilnet.com/api/http/"
data = urlencode({"class": afilnet_class,"method": afilnet_method,"user": afilnet_user,"password": afilnet_password,"idgroup": afilnet_idgroup}).encode("utf-8")
result = urlopen(sUrl, data).read()
print(result)
import requests
afilnet_class="group"
afilnet_method="getcontacts"
afilnet_user="user"
afilnet_password="password"
afilnet_idgroup="1000"
# Create an URL request
sUrl = "https://www.afilnet.com/api/basic/?class="+afilnet_class+"&method="+afilnet_method+"&idgroup="+afilnet_idgroup
result = requests.get(sUrl,auth=requests.auth.HTTPBasicAuth(afilnet_user,afilnet_password))
print(result.text)
Parametre | Açıklama | Zorunlu / Seçmeli |
---|---|---|
class=group | İstenen sınıf: İsteğin yapıldığı sınıf | Zorunlu |
method=getcontacts | İstenen sınıf yöntemi: İsteğin yapıldığı sınıfın yöntemi | Zorunlu |
user | Afilnet hesabınızın kullanıcısı ve e-postası | Zorunlu |
password | Afilnet hesabınızın şifresi | Zorunlu |
idgroup | Grup kimliği | Zorunlu |
İstek yaptığınızda aşağıdaki alanları alacaksınız:
- status
-
sonuç (eğer durum = başarı ise), aşağıdaki değerleri alacaksınız:
- Size başka hiçbir değer gönderilmeyecek
- hata (eğer durum = hata ise), burada hata kodunu alacaksınız
Muhtemel hata kodları aşağıda listelenmiştir.
kod | Açıklama |
---|---|
MISSING_USER | Kullanıcı veya e-posta dahil değil |
MISSING_PASSWORD | Şifre dahil değil |
MISSING_CLASS | Sınıf dahil değil |
MISSING_METHOD | Yöntem dahil değil |
MISSING_COMPULSORY_PARAM | Zorunlu parametre dahil değil |
INCORRECT_USER_PASSWORD | Yanlış kullanıcı veya şifre |
INCORRECT_CLASS | Yanlış sınıf |
INCORRECT_METHOD | Yanlış yöntem |
NOT_ACCESS_TO_GROUP | Belirtilen gruba giremezsiniz |
Parametreler:
- class : group
- method : getcontacts
- user : user
- password : password
- idgroup : 1000
İstek:
https://www.afilnet.com/api/http/?class=group&method=getcontacts&user=user&password=password&idgroup=1000