GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - flutter-jp/flutter_github_api: flutter github v3 api library based on github.dart

BranchesTags
Open more actions menu

Latest commit

 

History

37 Commits
37 Commits

Folders and files

NameName
Last commit message
Last commit date
command
command
 
 
example
example
 
 
image
image
 
 
lib
lib
 
 
.gitignore
.gitignore
 
 
.metadata
.metadata
 
 
CHANGELOG.md
CHANGELOG.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
analysis_options.yaml
analysis_options.yaml
 
 
pubspec.lock
pubspec.lock
 
 
pubspec.yaml
pubspec.yaml
 
 

Repository files navigation

flutter github api

Pub

flutter github v3 api library based on github.dart

api extension

  • get authorization
  • third part login
  • get token

getting start

dependencies:
  github: ^0.2.0

usage

  1. third part login
    import 'package:flutter_github_api/flutter_github_api.dart';
    import 'flutter_github_api/entity/index.dart';
    User user;

    login(String username,String password){
    	// how to get clientId and clientSecret please visit https://github.com/settings/apps/new
        Auth auth = Auth('your clientId', 'your clientSecret');
        GithubOauth oauth = GithubOauth(auth);
        oauth.login(username,password).then((result){
        	if(result.data == null){
        		// 1. this means your clientId or clientSecret is error
        		// 2. this means your username or password is error
        		// 3. detail information please see result.code and result.message
        	} else {
        		setState((){
        		  this.user = result.data;
        		});
        	}
        });
    }
  1. get token
  import 'package:flutter_github_api/flutter_github_api.dart';
  import 'flutter_github_api/entity/index.dart';
  
    String token='';
    getToken(String username,String password){
	    GithubOauth oauth = GithubOauth(auth);
	    oauth.login(username,password).then((result){
            if(result.data == null){
                // 1. this means your clientId or clientSecret is error
                // 2. this means your username or password is error
                // 3. detail information please see result.code and result.message
            } else {
                setState((){
                  this.token = result.data;
                });
            }
        });
    }
  1. new issue
    import 'package:flutter_github_api/flutter_github_api.dart';
    import 'flutter_github_api/entity/index.dart';
    void main() {
    	// how to get the token please see No2
      GitHub github = createGitHubClient(auth:  Authentication.withToken(token));
      RepositorySlug slug = RepositorySlug("flutter_jp", "flutter_github_api");
      GithubIssueRequest issue = GithubIssueRequest('just a test');
      github.issues.create(slug, issue);
    }

image

detail

please visit github.dart

license

MIT

About

flutter github v3 api library based on github.dart

flutter-github-api.xiaomo.info

Topics

apifluttergithubpackagev3

Resources

Readme
MIT license
Activity
Custom properties

Stars

3 stars

Watchers

0 watching

Forks

2 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.