Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Application for integrating with Yandex AppMetrica https://appmetrica.yandex.ru/
Yandex Docs https://tech.yandex.ru/appmetrica/doc/mobile-api/push/use-cases-docpage/
.. image:: https://travis-ci.org/MyBook/appmetrica.svg?branch=master :target: https://travis-ci.org/MyBook/appmetrica .. image:: https://codecov.io/gh/MyBook/appmetrica/branch/master/graph/badge.svg :target: https://codecov.io/gh/MyBook/appmetrica
Before using API it is necessary:
Get application id
from your account in appmetrica.yandex.ru
Create API
instance::
from appmetrica.push.api import PushAPI
api = PushAPI(application_id, access_token)
Create group to combine the sending in the report::
group_id = api.create_group('test-push-1', send_rate=500)
Pass group_id
, device list
and message
to send_push method and call::
from appmetrica.push.api import TokenTypes
transfer_id = api.send_push(group_id, devices=devices, ios_message=ios_message, android_message=android_message, tag='harry potter')
devices - list of token objects like: [ { "id_type": TokenTypes.APPMETRICA_DEVICE_ID, "id_values": ["123456789", "42"] }, { "id_type": TokenTypes.IOS_IFA, "id_values": ["8A690667-6204-4A6A-9B38-85DE016....."] }, { "id_type": TokenTypes.ANDROID_PUSH_TOKEN, "id_values": ["eFfxdO7uCMw:APA91bF1tN3X3BAbiJXsQhk-..."] } ]
ios_message - push message for ios devices android_message - push message for android devices: { "silent": false, "content": { "title": "string", "text": "string", "sound": "disable", "data": "string" } }
To check status of push call check_status
method::
status = api.check_status(transfer_id)
Create API
instance::
from appmetrica.push.api import PushAPI
api = PushAPI(application_id, access_token)
Get list of groups
group_id = api.get_groups()
Create API
instance::
from appmetrica.export.api import ExportAPI
api = ExportAPI(application_id, access_token)
Call push_tokens method with necessary fields::
data = api.export_push_tokens('token', 'ios_ifa', 'google_aid')
Create API
instance::
from appmetrica.export.api import ExportAPI
api = ExportAPI(application_id, access_token)
Call push_tokens method with necessary fields::
date_till = datetime.now() date_from = date_till - timedelta(days=7)
data = api.export_installations('ios_ifv', date_from=date_from, date_till=date_till)
Install twine <https://pypi.org/project/twine/>
_ globally::
pip install twine
Don't forget to bump the package version::
version = '1.0.5'
Build the release::
python setup.py sdist bdist_wheel
Publish the release on PyPi::
twine upload dist/*
send
method to send-batch
FAQs
API for integration with Yandex AppMetrica
We found that appmetrica demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.