insta_public_api
공개 사용자의 인스타그램 세부 정보를 얻기 위한 플러그인입니다. 단순히 InstaPublicApi 클래스 내에 사용자 이름을 전달하고 필요한 세부 정보를 얻으세요.
사용자 이름만 입력하면 공개된 인스타그램 계정의 세부 정보를 가져올 수 있습니다.
{"sdk":"flutter"}^0.13.3{"sdk":"flutter"}아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.
Fetch details of a public Instagram account just by entering their username
// Import the package
import 'package:insta_public_api/insta_public_api.dart';
// Initialize with username (must be public)
final ipa = InstaPublicApi('username');
// Get info like Full Name, Followers, Following etc
final info = await ipa.getBasicInfo();
print('Posts: ${info.noOfPosts}');
print('Followers: ${info.followers}');
print('Following: ${info.following}');
/*
Basic Info contains:
isPrivate,
isVerified,
profilePic,
followers,
following,
fullName,
noOfPosts,
bio and more.
*/
// Get a List of Post with nested images and details eg. number of likes, comments, caption etc for first 12 posts.
final timelinePosts = await ipa.getTimelinePosts();
// Get List of all the posts present on the profile (by default limited to 100, can be modified)
final posts = await ipa.getAllPosts();
/*
Each Post Contains:
Nested images,
no. of comments,
no. of likes,
captions and more.
*/
Example App
Click Here for Code
String getProfilePic() returns image url of profile pic
BasicInfo getBasicInfo() returns fullName, followers, following etc.
List<String> getTimelinePostsImages() returns a List of imageUrl for first 12 posts.
List<Post> getTimelinePosts() returns Post with nested images and details e.g. number of likes, comments, caption etc of first 12 posts.
List<Post> getAllPosts() returns List of all the posts present on the profile (by default limited to 100, can be modified).
Inspired from this article